summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-05-14 22:10:55 +1200
committerGitHub <noreply@github.com>2020-05-14 22:10:55 +1200
commit0e3b0fcdba70cf96a8e0654eb8f50aacb8024bd4 (patch)
tree74d381412dfd8ff49dd3039f8aeae09ad9e4e6e3 /include
parent336119dfc5e6baae0a936d6feae780a61975479c (diff)
Thread scheduler for light weight concurrency.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3032 Merged-By: ioquatix <samuel@codeotaku.com>
Diffstat (limited to 'include')
-rw-r--r--include/ruby/internal/intern/cont.h1
-rw-r--r--include/ruby/internal/intern/thread.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/ruby/internal/intern/cont.h b/include/ruby/internal/intern/cont.h
index 6988f753c3..cfa5630af2 100644
--- a/include/ruby/internal/intern/cont.h
+++ b/include/ruby/internal/intern/cont.h
@@ -28,6 +28,7 @@ RBIMPL_SYMBOL_EXPORT_BEGIN()
/* cont.c */
VALUE rb_fiber_new(rb_block_call_func_t, VALUE);
+VALUE rb_fiber_new_kw(rb_block_call_func_t, VALUE, int kw_splat);
VALUE rb_fiber_resume(VALUE fib, int argc, const VALUE *argv);
VALUE rb_fiber_resume_kw(VALUE fib, int argc, const VALUE *argv, int kw_splat);
VALUE rb_fiber_yield(int argc, const VALUE *argv);
diff --git a/include/ruby/internal/intern/thread.h b/include/ruby/internal/intern/thread.h
index a12a371058..4a840cd881 100644
--- a/include/ruby/internal/intern/thread.h
+++ b/include/ruby/internal/intern/thread.h
@@ -71,6 +71,10 @@ VALUE rb_mutex_unlock(VALUE mutex);
VALUE rb_mutex_sleep(VALUE self, VALUE timeout);
VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg);
+VALUE rb_thread_scheduler_get(VALUE);
+VALUE rb_thread_scheduler_set(VALUE, VALUE);
+VALUE rb_current_thread_scheduler(void);
+
RBIMPL_SYMBOL_EXPORT_END()
#endif /* RBIMPL_INTERN_THREAD_H */