diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-10-16 14:25:58 +1300 |
---|---|---|
committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-11-07 23:39:50 +1300 |
commit | a08ee8330d3d739467bfa34deeb797d83e59ed3c (patch) | |
tree | d14bc8f1417f39f9924b93343ddfd6451b3db8c3 /thread_sync.c | |
parent | 656d4cddaf2debd0c66b9bd980f51bcbf0849bd6 (diff) |
Rename to `Fiber#set_scheduler`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3742
Diffstat (limited to 'thread_sync.c')
-rw-r--r-- | thread_sync.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/thread_sync.c b/thread_sync.c index ff3399ef3e..753b65e4dc 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -246,7 +246,7 @@ mutex_owned_p(rb_fiber_t *fiber, rb_mutex_t *mutex) } static VALUE call_rb_scheduler_block(VALUE mutex) { - return rb_scheduler_block(rb_thread_current_scheduler(), mutex, Qnil); + return rb_scheduler_block(rb_scheduler_current(), mutex, Qnil); } static VALUE remove_from_mutex_lock_waiters(VALUE arg) { @@ -281,7 +281,7 @@ do_mutex_lock(VALUE self, int interruptible_p) } while (mutex->fiber != fiber) { - VALUE scheduler = rb_thread_current_scheduler(); + VALUE scheduler = rb_scheduler_current(); if (scheduler != Qnil) { list_add_tail(&mutex->waitq, &w.node); @@ -516,7 +516,7 @@ rb_mutex_sleep(VALUE self, VALUE timeout) rb_mutex_unlock(self); time_t beg = time(0); - VALUE scheduler = rb_thread_current_scheduler(); + VALUE scheduler = rb_scheduler_current(); if (scheduler != Qnil) { rb_scheduler_kernel_sleep(scheduler, timeout); mutex_lock_uninterruptible(self); |