I wonder if there's any way to implement time-slicing in Ruby. e.g. Thread, go do work until 20 milliseconds from now, then pause & yield
So you specifically want to interrupt a coroutine non-intrusively? No, that will require either control of the scheduler or intrusive code
-
-
-
Yeah so you'd need to control the scheduler
- 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
trying to emulate this.