Skip to content

Conversation

@hsbt
Copy link
Member

@hsbt hsbt commented Jun 25, 2021

The test-case of Ractor needs to separate the test process use by assert_ractor assertion. I will make it.

But I found a failure of test_ractor of uri library. @kvokka Can you look https://github.com/ruby/uri/runs/2911438018 ?

 #<Thread:0x00007fe5020e32d0 run> terminated with exception (report_on_exception is true): | /Users/runner/work/uri/uri/lib/uri/common.rb:75:in `scheme_list': can not access non-shareable objects in constant URI::SCHEME_LIST_MUTEX by non-main ractor. (Ractor::IsolationError) 
@hsbt
Copy link
Member Author

hsbt commented Jun 25, 2021

I'm not sure why they fails only macOS.

@eregon
Copy link
Member

eregon commented Jun 25, 2021

FWIW, it seems to work on Linux probably because bundler loads URI and so computes the URI::SCHEMES early, before the Ractor is created.
Adding URI.refresh_scheme_list inside the Ractor.new {} fails reliably, and there is no way to share a Mutex between Ractors.
#26 avoids that issue.

@hsbt hsbt closed this Jun 25, 2021
@hsbt hsbt deleted the assert-ractor branch June 25, 2021 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants