[#111712] [Ruby master Feature#19322] Support spawning "private" child processes — "kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core" <ruby-core@...>
SXNzdWUgIzE5MzIyIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGtqdHNhbmFrdHNpZGlzIChLSiBUc2Fu
14 messages
2023/01/07
[ruby-core:112030] [Ruby master Bug#19372] Proc objects are not traversed for shareable check during Ractor.make_shareable(prok)
From:
"luke-gru (Luke Gruber) via ruby-core" <ruby-core@...>
Date:
2023-01-25 12:49:34 UTC
List:
ruby-core #112030
Issue #19372 has been updated by luke-gru (Luke Gruber).
PR here: https://github.com/ruby/ruby/pull/7182
----------------------------------------
Bug #19372: Proc objects are not traversed for shareable check during Ractor.make_shareable(prok)
https://bugs.ruby-lang.org/issues/19372#change-101464
* Author: luke-gru (Luke Gruber)
* Status: Open
* Priority: Normal
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
```ruby
class Proc
attr_accessor :obj1
def initialize
@obj1 = Object.new
end
end
p = true.instance_eval { Proc.new { puts "hi" } }
Ractor.make_shareable(p)
p "Obj1 frozen?", Ractor.shareable?(p.obj1)
P = p
r = Ractor.new do
pp = P
p pp.obj1 # gives error in debug builds (rb_ractor_confirm_belonging rb_bug() call)
end
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/