aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-07-18 15:10:17 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-07-20 13:20:58 +1200
commitf3462d99a3dd8d535eda287b000cb035bade522c (patch)
treea1655328cd977dd10a6a2a020b7c57839b4bd1a9 /process.c
parent9f6a3d030682e9f99c77c2ef31881f9801c3979e (diff)
downloadruby-f3462d99a3dd8d535eda287b000cb035bade522c.tar.gz
Rename `rb_current_thread_scheduler` to `rb_thread_scheduler_if_nonblocking`.
Correctly capture thread before releasing GVL and pass as argument to `rb_thread_scheduler_if_nonblocking`.
Diffstat (limited to 'process.c')
-rw-r--r--process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/process.c b/process.c
index cd53030e9e..0a97425b0a 100644
--- a/process.c
+++ b/process.c
@@ -4923,7 +4923,7 @@ static VALUE
rb_f_sleep(int argc, VALUE *argv, VALUE _)
{
time_t beg = time(0);
- VALUE scheduler = rb_current_thread_scheduler();
+ VALUE scheduler = rb_thread_scheduler_if_nonblocking(rb_thread_current());
if (scheduler != Qnil) {
rb_funcallv(scheduler, rb_intern("wait_sleep"), argc, argv);