You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there. Thank you for all of your efforts with fiber_scheduler and the thought and planning that you've put into positioning it as a great default. I'm getting up to speed with Ruby 3 non-blocking fibers and have benefitted from your related writing.
I was playing around with using the fiber_scheduler gem and comparing it to other schedulers. I am using a non-block context (Fiber.set_scheduler). In an effort to have some test code do something that would take a little longer to complete, I added a 1_000.times loop wrapper and found that doing so causes a crash.
Using the code below I can reliably reproduce a crash with both Ruby 3.1.2 and 3.2.0-preview1.
If I remove the 1_000.times wrapper or lower the loop number to 92, the code works without crashing.
If I replace fiber_scheduler with async and FiberScheduler.new with Async::Scheduler.new, the code works without crashing.
As far as I can tell, #alive? ends up getting called on the wrong object, causing the crash. The object that method gets called on can change between runs.
Hi there. Thank you for all of your efforts with
fiber_scheduler
and the thought and planning that you've put into positioning it as a great default. I'm getting up to speed with Ruby 3 non-blocking fibers and have benefitted from your related writing.I was playing around with using the
fiber_scheduler
gem and comparing it to other schedulers. I am using a non-block context (Fiber.set_scheduler
). In an effort to have some test code do something that would take a little longer to complete, I added a1_000.times
loop wrapper and found that doing so causes a crash.1_000.times
wrapper or lower the loop number to92
, the code works without crashing.fiber_scheduler
withasync
andFiberScheduler.new
withAsync::Scheduler.new
, the code works without crashing.#alive?
ends up getting called on the wrong object, causing the crash. The object that method gets called on can change between runs.Code to reproduce:
Error output:
The text was updated successfully, but these errors were encountered: