1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add Ractor.shareable?(obj)

This method returns obj is shareable or not.
This commit is contained in:
Koichi Sasada 2020-10-20 11:21:49 +09:00
parent 99310e3eb5
commit 2bdbdc1580
Notes: git 2020-10-20 15:40:00 +09:00

View file

@ -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