1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Disable public interface for now.

This commit is contained in:
Samuel Williams 2021-03-30 17:33:15 +13:00
parent 92449e0e99
commit 3d32c21758
Notes: git 2021-03-30 14:39:02 +09:00
2 changed files with 19 additions and 15 deletions

View file

@ -22,12 +22,14 @@ VALUE rb_fiber_scheduler_make_timeout(struct timeval *timeout);
VALUE rb_fiber_scheduler_close(VALUE scheduler); 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_sleep(VALUE scheduler, VALUE duration);
VALUE rb_fiber_scheduler_kernel_sleepv(VALUE scheduler, int argc, VALUE * argv); 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); int rb_fiber_scheduler_supports_process_wait(VALUE scheduler);
VALUE rb_fiber_scheduler_process_wait(VALUE scheduler, rb_pid_t pid, int flags); VALUE rb_fiber_scheduler_process_wait(VALUE scheduler, rb_pid_t pid, int flags);

View file

@ -110,6 +110,19 @@ rb_fiber_scheduler_make_timeout(struct timeval *timeout)
return Qnil; 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 VALUE
rb_fiber_scheduler_timeout_after(VALUE scheduler, VALUE timeout, VALUE exception, VALUE message) 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); return rb_check_funcall(scheduler, id_timeout_after, argc, argv);
} }
#endif
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);
}
VALUE VALUE
rb_fiber_scheduler_process_wait(VALUE scheduler, rb_pid_t pid, int flags) rb_fiber_scheduler_process_wait(VALUE scheduler, rb_pid_t pid, int flags)