summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-10-30 00:32:53 +0900
committerKoichi Sasada <ko1@atdot.net>2020-10-30 03:12:09 +0900
commit5d97bdc2dcb835c877010daa033cc2b1dfeb86d6 (patch)
tree147bbd2e687a9db2bbd5fede670690eae644ebe1 /compile.c
parent502d6d845946f367ffb6e972e9c4ac401da94e99 (diff)
Ractor.make_shareable(a_proc)
Ractor.make_shareable() supports Proc object if (1) a Proc only read outer local variables (no assignments) (2) read outer local variables are shareable. Read local variables are stored in a snapshot, so after making shareable Proc, any assignments are not affeect like that: ```ruby a = 1 pr = Ractor.make_shareable(Proc.new{p a}) pr.call #=> 1 a = 2 pr.call #=> 1 # `a = 2` doesn't affect ``` [Feature #17284]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3722
Diffstat (limited to 'compile.c')
0 files changed, 0 insertions, 0 deletions