Project

General

Profile

Actions

Feature #22478

open

RbConfig::CONFIG could be Ractor-shareable by default?

Feature #22478: RbConfig::CONFIG could be Ractor-shareable by default?

Added by altruby (Alt Ruby) about 4 hours ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:127254]

Description

Hi

Is this intentional? The following code fails due to
Ractor::CONFIG not being Ractor-shareable.

##
# Ractor::IsolationError
require "rbconfig"
Ractor.new { 
  Process.wait Process.spawn(RbConfig.ruby, "-e", "p 123") 
}.value

This works fine but wouldn't be backwards compatible:

require "rbconfig"
Ractor.make_shareable(RbConfig::CONFIG)
Ractor.new { 
  Process.wait Process.spawn(RbConfig.ruby, "-e", "p 123") 
}.value

Would it be acceptable for RbConfig::CONFIG to
be deeply frozen, by default?

Thanks,

No data to display

Actions

Also available in: PDF Atom