diff options
author | Koichi Sasada <[email protected]> | 2020-10-20 11:21:49 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2020-10-20 15:39:37 +0900 |
commit | 2bdbdc1580f52dc8d70a71b824238e0f20342dca (patch) | |
tree | 7801ce5dc8a9ea25187af4426d797d1d15565178 /ractor.rb | |
parent | 99310e3eb56fbc85bb45119285812eb959448d0c (diff) |
add Ractor.shareable?(obj)
This method returns obj is shareable or not.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3672
Diffstat (limited to 'ractor.rb')
-rw-r--r-- | ractor.rb | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -166,4 +166,11 @@ class Ractor close_incoming close_outgoing end + + # utility method + def self.shareable? obj + __builtin_cexpr! %q{ + rb_ractor_shareable_p(obj) ? Qtrue : Qfalse; + } + end end |