Project

General

Profile

Actions

Bug #21505

open

[Ractor] calling exit from non-main ractor will hang if main ractor waits on it

Added by luke-gru (Luke Gruber) about 10 hours ago. Updated about 9 hours ago.

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

Description

r = Ractor.new do
  exit
end

r.join # hangs

Should exit be allowed in ractors? It would be easiest to disallow, as the code might be tricky if we allow it.

Updated by Eregon (Benoit Daloze) about 9 hours ago ยท Edited

Kernel#exit is basically just raise SystemExit, does it mean any exception in a Ractor hangs?
IOW, I don't think it should be disallowed because exit is just an Exception.

Updated by luke-gru (Luke Gruber) about 9 hours ago

Yeah fair enough. It's probably not as complicated to fix as I initially thought.

Actions

Also available in: Atom PDF

Like0
Like0Like0