mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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`.
This commit is contained in:
parent
9f6a3d0306
commit
f3462d99a3
Notes:
git
2020-07-20 10:21:24 +09:00
4 changed files with 46 additions and 39 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue