зеркало из https://github.com/github/ruby.git
Add `rb_thread_current_scheduler()`.
This commit is contained in:
Родитель
a9ccebbda0
Коммит
703e529751
|
@ -37,9 +37,11 @@ void rb_mutex_allow_trap(VALUE self, int val);
|
|||
VALUE rb_uninterruptible(VALUE (*b_proc)(VALUE), VALUE data);
|
||||
VALUE rb_mutex_owned_p(VALUE self);
|
||||
|
||||
VALUE rb_thread_scheduler_get(VALUE);
|
||||
VALUE rb_thread_scheduler_set(VALUE, VALUE);
|
||||
VALUE rb_thread_scheduler_get(VALUE thread);
|
||||
VALUE rb_thread_scheduler_set(VALUE thread, VALUE scheduler);
|
||||
|
||||
VALUE rb_thread_scheduler_if_nonblocking(VALUE thread);
|
||||
VALUE rb_thread_current_scheduler();
|
||||
|
||||
RUBY_SYMBOL_EXPORT_BEGIN
|
||||
/* Temporary. This API will be removed (renamed). */
|
||||
|
|
6
thread.c
6
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)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче