summaryrefslogtreecommitdiff
path: root/scheduler.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-12-26 22:09:49 +1300
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-03-30 18:38:42 +1300
commit511acba4aeb3e35cf025a8a6cde4241b7b5167f3 (patch)
tree9944f9cea1fd42e9dc6780bf9ed9dfd6d3090757 /scheduler.c
parent09c865d541472366550804ef09bf14e22a193644 (diff)
Update method name and add documentation.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4173
Diffstat (limited to 'scheduler.c')
-rw-r--r--scheduler.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/scheduler.c b/scheduler.c
index 49fb6e1..0080d55 100644
--- a/scheduler.c
+++ b/scheduler.c
@@ -17,7 +17,7 @@ static ID id_close;
static ID id_block;
static ID id_unblock;
-static ID id_timeout_raise;
+static ID id_timeout_after;
static ID id_kernel_sleep;
static ID id_process_wait;
@@ -33,7 +33,7 @@ Init_Fiber_Scheduler(void)
id_block = rb_intern_const("block");
id_unblock = rb_intern_const("unblock");
- id_timeout_raise = rb_intern_const("timeout_raise");
+ id_timeout_after = rb_intern_const("timeout_after");
id_kernel_sleep = rb_intern_const("kernel_sleep");
id_process_wait = rb_intern_const("process_wait");
@@ -110,19 +110,20 @@ rb_fiber_scheduler_make_timeout(struct timeval *timeout)
return Qnil;
}
-VALUE rb_fiber_scheduler_timeout_raise(VALUE scheduler, VALUE timeout, VALUE exception, VALUE message)
+VALUE
+rb_fiber_scheduler_timeout_after(VALUE scheduler, VALUE timeout, VALUE exception, VALUE message)
{
VALUE arguments[] = {
timeout, exception, message
};
- return rb_check_funcall(scheduler, id_timeout_raise, 3, arguments);
+ return rb_check_funcall(scheduler, id_timeout_after, 3, arguments);
}
VALUE
-rb_fiber_scheduler_timeout_raisev(VALUE scheduler, int argc, VALUE * argv)
+rb_fiber_scheduler_timeout_afterv(VALUE scheduler, int argc, VALUE * argv)
{
- return rb_check_funcall(scheduler, id_timeout_raise, argc, argv);
+ return rb_check_funcall(scheduler, id_timeout_after, argc, argv);
}
VALUE