summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-03-30 17:33:15 +1300
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-03-30 18:38:42 +1300
commit3d32c217586a48c709b762865a8abc46f9098455 (patch)
tree6f2a95cbb27168071c0167738165dd98437251ba
parent92449e0e99ae0e44f0deec5e59a7146824872952 (diff)
Disable public interface for now.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4173
-rw-r--r--include/ruby/fiber/scheduler.h8
-rw-r--r--scheduler.c26
2 files changed, 19 insertions, 15 deletions
diff --git a/include/ruby/fiber/scheduler.h b/include/ruby/fiber/scheduler.h
index 4979880..3bbd6be 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 0080d55..38846b6 100644
--- a/scheduler.c
+++ b/scheduler.c
@@ -111,32 +111,34 @@ rb_fiber_scheduler_make_timeout(struct timeval *timeout)
}
VALUE
-rb_fiber_scheduler_timeout_after(VALUE scheduler, VALUE timeout, VALUE exception, VALUE message)
+rb_fiber_scheduler_kernel_sleep(VALUE scheduler, VALUE timeout)
{
- VALUE arguments[] = {
- timeout, exception, message
- };
-
- return rb_check_funcall(scheduler, id_timeout_after, 3, arguments);
+ return rb_funcall(scheduler, id_kernel_sleep, 1, timeout);
}
VALUE
-rb_fiber_scheduler_timeout_afterv(VALUE scheduler, int argc, VALUE * argv)
+rb_fiber_scheduler_kernel_sleepv(VALUE scheduler, int argc, VALUE * argv)
{
- return rb_check_funcall(scheduler, id_timeout_after, argc, argv);
+ return rb_funcallv(scheduler, id_kernel_sleep, argc, argv);
}
+#if 0
VALUE
-rb_fiber_scheduler_kernel_sleep(VALUE scheduler, VALUE timeout)
+rb_fiber_scheduler_timeout_after(VALUE scheduler, VALUE timeout, VALUE exception, VALUE message)
{
- return rb_funcall(scheduler, id_kernel_sleep, 1, timeout);
+ VALUE arguments[] = {
+ timeout, exception, message
+ };
+
+ return rb_check_funcall(scheduler, id_timeout_after, 3, arguments);
}
VALUE
-rb_fiber_scheduler_kernel_sleepv(VALUE scheduler, int argc, VALUE * argv)
+rb_fiber_scheduler_timeout_afterv(VALUE scheduler, int argc, VALUE * argv)
{
- return rb_funcallv(scheduler, id_kernel_sleep, argc, argv);
+ return rb_check_funcall(scheduler, id_timeout_after, argc, argv);
}
+#endif
VALUE
rb_fiber_scheduler_process_wait(VALUE scheduler, rb_pid_t pid, int flags)