Closed tleish closed 9 months ago
In using Falcon, does async include a hook to monkey-patch Kernel#sleep with Async#sleep?
Kernel#sleep
Async#sleep
em-synchrony has the following hook/logic you can add to your code if using something like Goliath.
# Redirects to EM::Synchrony.sleep require "em-synchrony" EM::Synchrony.on_sleep do |*args| EM::Synchrony.sleep(*args) end
On Ruby 3.1+ and Async 2+, Kernel::sleep is redirected to the event loop
Kernel::sleep
CRuby: https://github.com/ruby/ruby/blob/fb4df44d1670e9d25aef6b235a7281199a177edb/process.c#L5162-L5170
Async: https://github.com/socketry/async/blob/2c5f92ed2027e50dbfa9ce599505498843c61687/lib/async/scheduler.rb#L151-L158
In using Falcon, does async include a hook to monkey-patch
Kernel#sleep
withAsync#sleep
?em-synchrony has the following hook/logic you can add to your code if using something like Goliath.