path: root/internal/scheduler.h
diff options
authorSamuel Williams <>2021-02-09 19:39:56 +1300
committerGitHub <>2021-02-09 19:39:56 +1300
commit5f69a7f60467fa58c2f998daffab43e118bff36c (patch)
treef60e3a5add29eb9cc7e68433c4e373e2a2facab7 /internal/scheduler.h
parent3c593f28ede99b77d4fe3258f9bda78dcee238a3 (diff)
Expose scheduler as public interface & bug fixes. (#3945)
* Rename `rb_scheduler` to `rb_fiber_scheduler`. * Use public interface if available. * Use `rb_check_funcall` where possible. * Don't use `unblock` unless the fiber was non-blocking.
Notes: Merged-By: ioquatix <>
Diffstat (limited to 'internal/scheduler.h')
1 files changed, 0 insertions, 44 deletions
diff --git a/internal/scheduler.h b/internal/scheduler.h
deleted file mode 100644
index 8314020220e..00000000000
--- a/internal/scheduler.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef RUBY_SCHEDULER_H /*-*-C-*-vi:se ft=c:*/
- * @file
- * @author Ruby developers <>
- * @copyright This file is a part of the programming language Ruby.
- * Permission is hereby granted, to either redistribute and/or
- * modify this file, provided that the conditions mentioned in the
- * file COPYING are met. Consult the file for details.
- * @brief Internal header for Scheduler.
- */
-#include "ruby/ruby.h"
-#include "ruby/intern.h"
-VALUE rb_scheduler_get();
-VALUE rb_scheduler_set(VALUE scheduler);
-VALUE rb_scheduler_current();
-VALUE rb_thread_scheduler_current(VALUE thread);
-VALUE rb_scheduler_timeout(struct timeval *timeout);
-VALUE rb_scheduler_close(VALUE scheduler);
-VALUE rb_scheduler_kernel_sleep(VALUE scheduler, VALUE duration);
-VALUE rb_scheduler_kernel_sleepv(VALUE scheduler, int argc, VALUE * argv);
-int rb_scheduler_supports_process_wait(VALUE scheduler);
-VALUE rb_scheduler_process_wait(VALUE scheduler, rb_pid_t pid, int flags);
-VALUE rb_scheduler_block(VALUE scheduler, VALUE blocker, VALUE timeout);
-VALUE rb_scheduler_unblock(VALUE scheduler, VALUE blocker, VALUE fiber);
-VALUE rb_scheduler_io_wait(VALUE scheduler, VALUE io, VALUE events, VALUE timeout);
-VALUE rb_scheduler_io_wait_readable(VALUE scheduler, VALUE io);
-VALUE rb_scheduler_io_wait_writable(VALUE scheduler, VALUE io);
-int rb_scheduler_supports_io_read(VALUE scheduler);
-VALUE rb_scheduler_io_read(VALUE scheduler, VALUE io, VALUE buffer, size_t offset, size_t length);
-int rb_scheduler_supports_io_write(VALUE scheduler);
-VALUE rb_scheduler_io_write(VALUE scheduler, VALUE io, VALUE buffer, size_t offset, size_t length);
-#endif /* RUBY_SCHEDULER_H */