[#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:103954] [Ruby master Feature#17849] Fix Timeout.timeout so that it can be used in threaded Web servers
From:
mame@...
Date:
2021-05-21 18:19:23 UTC
List:
ruby-core #103954
Issue #17849 has been updated by mame (Yusuke Endoh).
Just FYI. According to @ko1, masking all exceptions in an ensure clause is possible in pure Ruby, as long as you use MRI.
```
begin
...
ensure
Thread.handle_interrupt(Object => :never) do
..
end
end
```
No interrupt checking is executed outside of handle_interrupt block. This is an implementation detail of MRI, though.
Note: we don't insist that people should write such messy code for all ensure clauses. It may be just useful to perform a proof-of-concept of this proposal, whether it is practically possible to implement a global timeout.
----------------------------------------
Feature #17849: Fix Timeout.timeout so that it can be used in threaded Web servers
https://bugs.ruby-lang.org/issues/17849#change-92086
* 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>