Issue #6634 has been updated by kosaki (Motohiro KOSAKI).

Status changed from Assigned to Feedback

>thread = Thread.new {
>	mutex.synchronize {
>		cond.wait(mutex)
>	}
>}
>thread.join

This is true deadlock. The above thread.join has no chance to exit successfully.
Can you please elaborate your point?

----------------------------------------
Bug #6634: Deadlock with join and ConditionVariable
https://bugs.ruby-lang.org/issues/6634#change-27537

Author: meh. (meh. I don't care)
Status: Feedback
Priority: Normal
Assignee: kosaki (Motohiro KOSAKI)
Category: core
Target version: 
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


I'm getting a fatal deadlock in one of my gems, it's a simple threadpool implementation.

The library works both in Rubinius and JRuby, so I guess it's a bug.

The gem is here: https://github.com/meh/ruby-threadpool

The example that crashes is attached.

Basically it raises a fatal deadlock if you join a thread and then call ConditionVariable#wait, I'm not 100% sure if the bug is in the ConditionVariable or what, all I know is that it happens in that situation and that it works on Rubinius and JRuby.


-- 
http://bugs.ruby-lang.org/