aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-08-20 13:47:55 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-09-14 16:44:09 +1200
commit703e529751deb086a46a9c029ce38d4fff14e84c (patch)
tree178ee1aacd628dab0652da309cc13325914e6198 /thread.c
parenta9ccebbda0fed90952575f940440ac3697ba141b (diff)
downloadruby-703e529751deb086a46a9c029ce38d4fff14e84c.tar.gz
Add `rb_thread_current_scheduler()`.
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 2f265c5cfc..d10d4118c3 100644
--- a/thread.c
+++ b/thread.c
@@ -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)
{