[#105450] [Ruby master Feature#18228] Add a `timeout` option to `IO.copy_stream` — "byroot (Jean Boussier)" <noreply@...>
Issue #18228 has been reported by byroot (Jean Boussier).
11 messages
2021/09/27
[ruby-core:105447] [Ruby master Bug#18193] Accessing global configuration from Ractors
From:
"Eregon (Benoit Daloze)" <noreply@...>
Date:
2021-09-27 10:05:34 UTC
List:
ruby-core #105447
Issue #18193 has been updated by Eregon (Benoit Daloze).
#17592 would let this work but it has not been implemented yet, cc @ko1
----------------------------------------
Bug #18193: Accessing global configuration from Ractors
https://bugs.ruby-lang.org/issues/18193#change-93896
* Author: kirs (Kir Shatrov)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.0.2p107
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
Consider a very common Ruby code with `attr_accessor` on a class:
``` ruby
class GlobalConfig
class << self
attr_accessor :option
end
end
GlobalConfig.option = 123
GlobalConfig.freeze
puts GlobalConfig.frozen? # => true
r = Ractor.new do
GlobalConfig.option
end
puts r.take
```
Right now, this fails `can not access instance variables of classes/modules from non-main Ractors`.
Is this considered a bug? If it is, I'd be happy to work on a fix.
To me, it seems like we should allow accessing frozen objects.
If this is expected behavior, then I'd like to open a conversation for how libraries and apps should expose things like global configuration for Ractors to consume.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>