From 3d32c217586a48c709b762865a8abc46f9098455 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Tue, 30 Mar 2021 17:33:15 +1300 Subject: [PATCH] Disable public interface for now. --- include/ruby/fiber/scheduler.h | 8 +++++--- scheduler.c | 26 ++++++++++++++------------ 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/include/ruby/fiber/scheduler.h b/include/ruby/fiber/scheduler.h index 4979880d9c..3bbd6be233 100644 --- a/include/ruby/fiber/scheduler.h +++ b/include/ruby/fiber/scheduler.h @@ -22,12 +22,14 @@ 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 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); +#if 0 +VALUE rb_fiber_scheduler_timeout_after(VALUE scheduler, VALUE timeout, VALUE exception, VALUE message); +VALUE rb_fiber_scheduler_timeout_afterv(VALUE scheduler, int argc, VALUE * argv); +#endif + int rb_fiber_scheduler_supports_process_wait(VALUE scheduler); VALUE rb_fiber_scheduler_process_wait(VALUE scheduler, rb_pid_t pid, int flags); diff --git a/scheduler.c b/scheduler.c index 0080d556e6..38846b6611 100644 --- a/scheduler.c +++ b/scheduler.c @@ -110,6 +110,19 @@ rb_fiber_scheduler_make_timeout(struct timeval *timeout) return Qnil; } +VALUE +rb_fiber_scheduler_kernel_sleep(VALUE scheduler, VALUE timeout) +{ + return rb_funcall(scheduler, id_kernel_sleep, 1, timeout); +} + +VALUE +rb_fiber_scheduler_kernel_sleepv(VALUE scheduler, int argc, VALUE * argv) +{ + return rb_funcallv(scheduler, id_kernel_sleep, argc, argv); +} + +#if 0 VALUE rb_fiber_scheduler_timeout_after(VALUE scheduler, VALUE timeout, VALUE exception, VALUE message) { @@ -125,18 +138,7 @@ rb_fiber_scheduler_timeout_afterv(VALUE scheduler, int argc, VALUE * argv) { return rb_check_funcall(scheduler, id_timeout_after, argc, argv); } - -VALUE -rb_fiber_scheduler_kernel_sleep(VALUE scheduler, VALUE timeout) -{ - return rb_funcall(scheduler, id_kernel_sleep, 1, timeout); -} - -VALUE -rb_fiber_scheduler_kernel_sleepv(VALUE scheduler, int argc, VALUE * argv) -{ - return rb_funcallv(scheduler, id_kernel_sleep, argc, argv); -} +#endif VALUE rb_fiber_scheduler_process_wait(VALUE scheduler, rb_pid_t pid, int flags)