
Issue #20413 has been updated by ioquatix (Samuel Williams).
What is the use-case here, to use an Enumerator backed by a Fiber (so next/peek) in a Fiber scheduler?
Yes.
Changing Enumerator fibers would be safer, but probably still incompatible.
Can you show evidence where this breaks some existing test or program? The fiber scheduler is transparent to user code, so there shouldn't be any incompatibility. Additionally, `Fiber.new` adopted this a while ago and there have been no issues. `Fiber.new` is arguably more widely used than `rb_fiber_new`. ---------------------------------------- Bug #20413: Enumerator can block fiber scheduler. https://bugs.ruby-lang.org/issues/20413#change-107839 * Author: ioquatix (Samuel Williams) * Status: Closed * Assignee: ioquatix (Samuel Williams) * Backport: 3.0: UNKNOWN, 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED ---------------------------------------- Using `Enumerator` in the event loop can cause problems as the fiber created by `rb_fiber_new` is blocking by default. It should be non-blocking. See <https://github.com/ruby/ruby/pull/10481> for the fix. -- https://bugs.ruby-lang.org/