aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-09-05 14:30:21 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-09-14 16:44:09 +1200
commit9e0a48c7a31ecd39be0596d0517b9d521ae75282 (patch)
tree19abd9cb95734086fb2684de3ea72e7fdce25cad /process.c
parent701dcbb3ca9bf04b61cc07156608c61aaf9173f0 (diff)
downloadruby-9e0a48c7a31ecd39be0596d0517b9d521ae75282.tar.gz
Prefer `rb_thread_current_scheduler`.
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 317f7ff3ec..8abb3ea86f 100644
--- a/process.c
+++ b/process.c
@@ -4926,7 +4926,7 @@ static VALUE
rb_f_sleep(int argc, VALUE *argv, VALUE _)
{
time_t beg = time(0);
- VALUE scheduler = rb_thread_scheduler_if_nonblocking(rb_thread_current());
+ VALUE scheduler = rb_thread_current_scheduler();
if (scheduler != Qnil) {
rb_scheduler_kernel_sleepv(scheduler, argc, argv);