diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-08-20 13:47:55 +1200 |
---|---|---|
committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-09-14 16:44:09 +1200 |
commit | 703e529751deb086a46a9c029ce38d4fff14e84c (patch) | |
tree | 178ee1aacd628dab0652da309cc13325914e6198 /thread.c | |
parent | a9ccebbda0fed90952575f940440ac3697ba141b (diff) |
Add `rb_thread_current_scheduler()`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3434
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3749,6 +3749,12 @@ rb_thread_scheduler(VALUE klass) return rb_thread_scheduler_if_nonblocking(rb_thread_current()); } +static VALUE +rb_thread_current_scheduler() +{ + return rb_thread_scheduler_if_nonblocking(rb_thread_current()); +} + VALUE rb_thread_scheduler_if_nonblocking(VALUE thread) { |