Skip to content

Conversation

@kirs
Copy link
Contributor

@kirs kirs commented Jan 22, 2021

(copy of ruby/ruby#4008)

Before this fix,

r = Ractor.new do
  Time.rfc2822("Fri, 21 Nov 1997 09:55:06 -0600")
end
Ractor.select(r)

fails with:

#<Thread:0x00007fe96306b810 run> terminated with exception (report_on_exception is true):
/opt/rubies/3.0.0/lib/ruby/3.0.0/time.rb:515:in `rfc2822': can not access non-shareable objects in constant #<Class:0x00007fe96408dfb8>::MonthValue by non-main ractor. (Ractor::IsolationError)
	from notractor.rb:14:in `block in <main>'
<internal:ractor>:345:in `select': thrown by remote Ractor. (Ractor::RemoteError)
	from notractor.rb:16:in `<main>'
/opt/rubies/3.0.0/lib/ruby/3.0.0/time.rb:515:in `rfc2822': can not access non-shareable objects in constant #<Class:0x00007fe96408dfb8>::MonthValue by non-main ractor. (Ractor::IsolationError)
	from notractor.rb:14:in `block in <main>'

@nobu @akr

@nobu nobu merged commit c784e4f into ruby:master Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants