Samuel Williams
a08ee8330d
Rename to Fiber#set_scheduler
.
2020-11-07 23:39:50 +13:00
Nobuyoshi Nakada
257007af9a
Added a fallback return
2020-10-01 13:46:13 +09:00
Nobuyoshi Nakada
0e98a9c854
break around function definition [ci skip]
2020-10-01 13:44:29 +09:00
Samuel Williams
13660105e2
Don't call Scheduler#close
if it doesn't exist.
2020-10-01 16:02:03 +13:00
Samuel Williams
70f08f1eed
Make Thread#join
non-blocking.
2020-09-21 11:48:44 +12:00
Samuel Williams
501fff14c7
When setting current thread scheduler to nil, invoke #close
.
2020-09-21 09:51:33 +12:00
Benoit Daloze
738a089b3a
Rename scheduler.{mutex_lock,mutex_unlock} to {block,unblock}
...
* Move #kernel_sleep next to #block as it is similar
2020-09-17 14:30:40 +02:00
Benoit Daloze
178c1b0922
Make Mutex per-Fiber instead of per-Thread
...
* Enables Mutex to be used as synchronization between multiple Fibers
of the same Thread.
* With a Fiber scheduler we can yield to another Fiber on contended
Mutex#lock instead of blocking the entire thread.
* This also makes the behavior of Mutex consistent across CRuby, JRuby and TruffleRuby.
* [Feature #16792 ]
2020-09-14 16:44:09 +12:00
Samuel Williams
701dcbb3ca
Add support for hooking IO#read
.
2020-09-14 16:44:09 +12:00
Samuel Williams
d387029f39
Standardised scheduler interface.
2020-09-14 16:44:09 +12:00