Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement pluggable scheduler #44

Open
kingdonb opened this issue Jul 10, 2023 · 0 comments
Open

Implement pluggable scheduler #44

kingdonb opened this issue Jul 10, 2023 · 0 comments

Comments

@kingdonb
Copy link
Owner

kingdonb commented Jul 10, 2023

The fiber-scheduler and async 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, 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant