diff options
author | Delton Ding <[email protected]> | 2020-12-22 15:30:59 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2020-12-23 03:27:14 +0900 |
commit | c6d7e02b90f96d9bcd04edd48b7374f31c510b2a (patch) | |
tree | 294b80840d1c00a9f9117f1608cc8abd7599f6ba /cont.c | |
parent | 487355873ad0de9ab70611d63d97f3fbbfebe79d (diff) |
Enable `Fiber.current` and `Fiber#alive?` call inside ractor
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3971
Diffstat (limited to 'cont.c')
-rw-r--r-- | cont.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2744,6 +2744,9 @@ ruby_Init_Continuation_body(void) void ruby_Init_Fiber_as_Coroutine(void) { +#ifdef HAVE_RB_EXT_RACTOR_SAFE + rb_ext_ractor_safe(true); +#endif rb_define_method(rb_cFiber, "transfer", rb_fiber_m_transfer, -1); rb_define_method(rb_cFiber, "alive?", rb_fiber_alive_p, 0); rb_define_singleton_method(rb_cFiber, "current", rb_fiber_s_current, 0); |