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:
parent
99310e3eb5
commit
2bdbdc1580
Notes:
git
2020-10-20 15:40:00 +09:00
1 changed files with 7 additions and 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
|
||||
|
|
Loading…
Add table
Reference in a new issue