-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
This simple script demonstrates an edge-case where Thread#kill does not kill a thread as expected on JRuby. It intermittently hangs on JRuby but reliably runs on other Ruby implementations (MRI, TruffleRuby):
Thread.new {sleep rescue sleep}.
tap {|t| t.raise 'Error'}.
tap(&:kill).
tap(&:join)Some notes:
- It seems to be a race condition / timing issue related to the rescue operation?
- If I add a
sleep 0.1aftert.raise 'Error', the script passes - If I change
t.raise 'Error'tot.raise RuntimeError.new(ort.raise), the script passes
Environment Information
JRuby version 9.2.11.1 on Ubuntu 18.04
jruby 9.2.11.1 (2.5.7) 2020-03-25 b1f55b1a40 Java HotSpot(TM) 64-Bit Server VM 25.131-b11 on 1.8.0_131-b11 [linux-x86_64]
Linux wjordan 4.15.0-88-generic #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels