mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix native implementation.
# Conflicts: # scheduler.c
This commit is contained in:
parent
67f60ebb64
commit
09c865d541
Notes:
git
2021-03-30 14:39:04 +09:00
2 changed files with 14 additions and 4 deletions
|
@ -22,7 +22,8 @@ VALUE rb_fiber_scheduler_make_timeout(struct timeval *timeout);
|
|||
|
||||
VALUE rb_fiber_scheduler_close(VALUE scheduler);
|
||||
|
||||
VALUE rb_fiber_scheduler_timeout_raise(VALUE scheduler, VALUE duration);
|
||||
VALUE rb_fiber_scheduler_timeout_raise(VALUE scheduler, VALUE timeout, VALUE exception, VALUE message);
|
||||
VALUE rb_fiber_scheduler_timeout_raisev(VALUE scheduler, int argc, VALUE * argv);
|
||||
|
||||
VALUE rb_fiber_scheduler_kernel_sleep(VALUE scheduler, VALUE duration);
|
||||
VALUE rb_fiber_scheduler_kernel_sleepv(VALUE scheduler, int argc, VALUE * argv);
|
||||
|
|
15
scheduler.c
15
scheduler.c
|
@ -110,10 +110,19 @@ rb_fiber_scheduler_make_timeout(struct timeval *timeout)
|
|||
return Qnil;
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_fiber_scheduler_timeout_raise(VALUE scheduler, VALUE timeout)
|
||||
VALUE rb_fiber_scheduler_timeout_raise(VALUE scheduler, VALUE timeout, VALUE exception, VALUE message)
|
||||
{
|
||||
return rb_check_funcall(scheduler, id_timeout_raise, 1, &timeout);
|
||||
VALUE arguments[] = {
|
||||
timeout, exception, message
|
||||
};
|
||||
|
||||
return rb_check_funcall(scheduler, id_timeout_raise, 3, arguments);
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_fiber_scheduler_timeout_raisev(VALUE scheduler, int argc, VALUE * argv)
|
||||
{
|
||||
return rb_check_funcall(scheduler, id_timeout_raise, argc, argv);
|
||||
}
|
||||
|
||||
VALUE
|
||||
|
|
Loading…
Add table
Reference in a new issue