From: eregontp@... Date: 2021-05-19T19:34:03+00:00 Subject: [ruby-core:103896] [Ruby master Feature#17849] Fix Timeout.timeout so that it can be used in threaded Web servers Issue #17849 has been updated by Eregon (Benoit Daloze). @byroot For the blocking C extension code without an unblocking function case, I think there is no other way to unstuck it than to kill the entire process. That's probably a good last measure to have, but obviously it's very costly so should only be used when there is no other way. ---------------------------------------- Feature #17849: Fix Timeout.timeout so that it can be used in threaded Web servers https://bugs.ruby-lang.org/issues/17849#change-92020 * Author: duerst (Martin D�rst) * Status: Open * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) ---------------------------------------- Making this a separate issue from #17837 Eregon (Benoit Daloze) wrote in https://bugs.ruby-lang.org/issues/17837#note-10 (which is about timeouts for regular expressions): > I think fixing Timeout.timeout might be possible. > The main/major issue is it can trigger within `ensure`, right? Is there anything else? > We could automatically mask `Thread#raise` within `ensure` so it only happens after the `ensure` body completes. > And we could still have a larger "hard timeout" if an `ensure` takes way too long (shouldn't happen, but one cannot be sure). > I recall discussing this with @schneems some time ago on Twitter. -- https://bugs.ruby-lang.org/ Unsubscribe: