From: eregontp@... Date: 2020-12-26T12:48:40+00:00 Subject: [ruby-core:101712] [Ruby master Bug#17470] Introduce non-blocking `Timeout.timeout` Issue #17470 has been updated by Eregon (Benoit Daloze). How would that work, what would be a sample implementation of the hook? `Timeout.timeout` must be able to interrupt non-IO operations as well. ---------------------------------------- Bug #17470: Introduce non-blocking `Timeout.timeout` https://bugs.ruby-lang.org/issues/17470#change-89535 * Author: ioquatix (Samuel Williams) * Status: Open * Priority: Normal * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- In this bug report, user complained that `Timeout.timeout` does not work correctly with scheduler: https://github.com/socketry/async-io/issues/43 We should introduce non-blocking timeout. I propose the following: ``` rb_fiber_scheduler_with_timeout(VALUE scheduler, VALUE timeout, VALUE block) ``` We can directly modify `Timeout.timeout` to invoke this hook. -- https://bugs.ruby-lang.org/ Unsubscribe: