Can someone explain to me why this code deadlocks? http://pastie.caboo.se/58791
|gnufied||where are you getting deadlock?|
i am not seeing any deadlock
i am running it from within textmate. what version of ruby are you running?
|Olathe||What does cv.wait do ?|
What does cv.wait do ?
|bigred||it waits for a condition to be met|
|Olathe||Why is mutex passed to it ?|
|gnufied||Olathe, thats how condition variable works, read the docs|
bigred, i am not getting any deadlock, I am on Linux, 1.8.5-p2
i do not see the point though
|Olathe||What happens if cv.wait is called after cv.signal ?|
|teferi||hey, it's blink|
|action||blink dances around the room in greetings.|
|blink||dances around the room in greetings.|
|action||blink waits for her friend to arrive to go see SpdrMn.|
|blink||waits for her friend to arrive to go see SpdrMn.|
|action||blink dances on Olathe's grave.|
|blink||dances on Olathe's grave.|
|action||blink bings happily for matadon.|
|blink||bings happily for matadon.|
|teferi||spiderman, spiderman, friendly neighborhood spiderman|
Did you get my happy message?
|action||blink cues Johnny Rotten and headbangs.|
|blink||cues Johnny Rotten and headbangs.|
|gnufied||Olathe, did you try it?|
|action||matadon is more of a Batman kind of guy, doubly so with Christian Bale playing the role.|
|matadon||is more of a Batman kind of guy, doubly so with Christian Bale playing the role.|
|gnufied||Olathe, you get a deadlock!|
|matadon||blink: I got accepted into Waseda University. ^^|
|gnufied||deadlock 0xb7cad020: sleep:- - /usr/local/lib/ruby/1.8/thread.rb:203|
|Olathe||blink has been cloned !|
earthlink needs to get a new main outlet.