mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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]
This commit is contained in:
parent
9e0a48c7a3
commit
178c1b0922
Notes:
git
2020-09-14 13:44:37 +09:00
9 changed files with 199 additions and 54 deletions
|
|
@ -20,4 +20,6 @@ void rb_fiber_reset_root_local_storage(struct rb_thread_struct *);
|
|||
void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(VALUE), VALUE (*rollback_func)(VALUE));
|
||||
void rb_fiber_init_mjit_cont(struct rb_fiber_struct *fiber);
|
||||
|
||||
VALUE rb_fiberptr_self(struct rb_fiber_struct *fiber);
|
||||
|
||||
#endif /* INTERNAL_CONT_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue