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
Ruby 3.0 introduced the FiberScheduler interface so that evented libraries like Async can hook into low-level blocking IO events and use them to efficiently schedule/coordinate concurrent Fiber-driven tasks behind the scenes.
I've been playing around with Ruby 3.1 + async Fiber-driven tasks + hiredis-rb, and I believe, as it stands, blocking operations like blpop are going to block the entire Reactor because hiredis isn't aware of the Fiber Scheduler.
It is possible for native C extension to be FiberScheduler-aware, see:
But I'm just wondering, would it be possible to make hiredis-rb be FiberScheduler-aware? Or are all the hookpoints too embedded within hiredis to make that work?
The text was updated successfully, but these errors were encountered:
machty
changed the title
This is probably not compatible with Ruby 3.0
This is probably not compatible with Ruby 3.0's Fiber Schedule
Jan 9, 2022
machty
changed the title
This is probably not compatible with Ruby 3.0's Fiber Schedule
This is probably not compatible with Ruby 3.0's Fiber Scheduler?
Jan 9, 2022
Ruby 3.0 introduced the FiberScheduler interface so that evented libraries like Async can hook into low-level blocking IO events and use them to efficiently schedule/coordinate concurrent Fiber-driven tasks behind the scenes.
I've been playing around with Ruby 3.1 + async Fiber-driven tasks + hiredis-rb, and I believe, as it stands, blocking operations like
blpop
are going to block the entire Reactor because hiredis isn't aware of the Fiber Scheduler.It is possible for native C extension to be FiberScheduler-aware, see:
https://www.wjwh.eu/posts/2020-12-28-ruby-fiber-scheduler-c-extension.html#integrating-the-fiber-scheduler-into-c-extensions
But I'm just wondering, would it be possible to make hiredis-rb be FiberScheduler-aware? Or are all the hookpoints too embedded within hiredis to make that work?
The text was updated successfully, but these errors were encountered: