diff options
author | Koichi Sasada <ko1@atdot.net> | 2021-01-06 15:30:56 +0900 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2021-01-13 17:07:02 +0900 |
commit | 1614dd9fd44e27aa5afc6de94602ac7292962d11 (patch) | |
tree | 0f20e7f5f306c4545ce744f944fa926d96b1ab9f /ractor.c | |
parent | b2beb8586e930c168af434d6545f75d76123192b (diff) |
expose some C-APIs for ractor
expose some C-APIs to try to make ractor utilities on external gems.
* add
* rb_ractor_local_storage_value_lookup() to check availability
* expose
* rb_ractor_make_shareable()
* rb_ractor_make_shareable_copy()
* rb_proc_isolate() (not public)
* rb_proc_isolate_bang() (not public)
* rb_proc_ractor_make_shareable() (not public)
Diffstat (limited to 'ractor.c')
-rw-r--r-- | ractor.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -3128,6 +3128,17 @@ rb_ractor_local_storage_value(rb_ractor_local_key_t key) } } +bool +rb_ractor_local_storage_value_lookup(rb_ractor_local_key_t key, VALUE *val) +{ + if (ractor_local_ref(key, (void **)val)) { + return true; + } + else { + return false; + } +} + void rb_ractor_local_storage_value_set(rb_ractor_local_key_t key, VALUE val) { |