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
It's not strictly necessary that we implement this as a reversible decision, we could just replace fiber-scheduler with async. But in terms of code review, it makes a lot more sense for me to implement this as a reversible decision or even feature flag. We should be able to turn off async behavior if possible as well, to exclude it when testing for issues.
Note that we can already turn off async behavior by using Fiber.blocking{binding.pry} when debugging in an on-demand way as needed, with Fiber.blocking or by the use of a mutex. See:
It isn't necessary to switch out the scheduler for any technical reason that I'm aware of at this point, other than I've seen some issues with Ruby 3.2 and the fiber-scheduler compatibility in released versions. I'll admit I got second thoughts about this fiber scheduler when I saw it needed to be run from an unreleased commit on (main) branch in order to run against the latest version of Ruby, and again when I saw that it hasn't apparently cut any releases in over a year (bruno-/fiber_scheduler tags last updated Feb 17, 2022 with v0.13.0)
If we can implement the switch-out mechanism and test both implementations in a setting where the opposite disabled scheduler has actually been removed at the Gemfile, then we'll know at least as much as the code review has been totally completed!
The text was updated successfully, but these errors were encountered:
The
fiber-scheduler
andasync
gems both have excellent documentation:I have doubts about my own correct implementation of fibers with the fiber_scheduler gem, would like to do a review for 0.2.0
It's not strictly necessary that we implement this as a reversible decision, we could just replace fiber-scheduler with async. But in terms of code review, it makes a lot more sense for me to implement this as a reversible decision or even feature flag. We should be able to turn off async behavior if possible as well, to exclude it when testing for issues.
Note that we can already turn off async behavior by using
Fiber.blocking{binding.pry}
when debugging in an on-demand way as needed, withFiber.blocking
or by the use of a mutex. See:RuntimeError: running is given, but running
ruby/debug#486 (comment)It isn't necessary to switch out the scheduler for any technical reason that I'm aware of at this point, other than I've seen some issues with Ruby 3.2 and the fiber-scheduler compatibility in released versions. I'll admit I got second thoughts about this fiber scheduler when I saw it needed to be run from an unreleased commit on (main) branch in order to run against the latest version of Ruby, and again when I saw that it hasn't apparently cut any releases in over a year (bruno-/fiber_scheduler tags last updated Feb 17, 2022 with v0.13.0)
If we can implement the switch-out mechanism and test both implementations in a setting where the opposite disabled scheduler has actually been removed at the Gemfile, then we'll know at least as much as the code review has been totally completed!
The text was updated successfully, but these errors were encountered: