[#104004] [Ruby master Feature#17883] Load bundler/setup earlier to make `bundle exec ruby -r` respect Gemfile — mame@...
Issue #17883 has been reported by mame (Yusuke Endoh).
21 messages
2021/05/24
[ruby-core:103852] [Ruby master Feature#17849] Fix Timeout.timeout so that it can be used in threaded Web servers
From:
eregontp@...
Date:
2021-05-14 18:15:24 UTC
List:
ruby-core #103852
Issue #17849 has been updated by Eregon (Benoit Daloze).
Another way to express the idea is that `ensure; code(); end` would automatically behave like `Thread.handle_interrupt(Object => :never) { code }`.
Since that would be directly in the interpreter and not actually call `Thread.handle_interrupt`, there is no worry that the interrupt happens during the call to `Thread.handle_interrupt` (which would be an issue when writing `ensure; Thread.handle_interrupt { ... }; end`).
byroot (Jean Boussier) wrote in #note-12:
> That would fix most issues, but not all. It can also trigger in places where exception are entirely unexpected, so there's just no `ensure`.
Do you have an example?
> Also I'm not clear on the details, but some C extensions (often various clients) can't be interrupted by `Thread#raise`.
If that's the case I would argue it's a bug of the C extension (for blocking without an unblocking function).
It seems very much expected that Ctrl+C always works in Ruby.
----------------------------------------
Feature #17849: Fix Timeout.timeout so that it can be used in threaded Web servers
https://bugs.ruby-lang.org/issues/17849#change-91971
* Author: duerst (Martin Dst)
* 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: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>