Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix newly-introduced Thread#kill deadlock

The following commit introduced another deadlock. Threads MUST be
Rubinius.synchronize-d, but they weren't in Thread#kill.

  ba7667b Correctly implement Thread#kill

Previously, Thread#kill internally used Thread#raise, which had gotten
completely deadlock-free. And there is no problem.

But, the commit made Thread#kill use a primitive for its function. That must be
inside Rubinius.synchronize as was before.
  • Loading branch information...
commit 3b4ed0fd3dd8dcfddc37722d448b7f42d8f5e73d 1 parent a69025c
Ryo Onodera ryoqun authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 kernel/bootstrap/thread19.rb
4 kernel/bootstrap/thread19.rb
@@ -101,7 +101,9 @@ def setup(prime_lock)
def kill
@dying = true
@sleep = false
- kill_prim
+ Rubinius.synchronize(self) do
+ kill_prim
+ end
alias_method :exit, :kill
Please sign in to comment.
Something went wrong with that request. Please try again.