Bug #5195 » patch.diff
lib/thread.rb | ||
---|---|---|
while true
|
||
if @que.empty?
|
||
raise ThreadError, "queue empty" if non_block
|
||
@waiting.push Thread.current
|
||
@waiting.push Thread.current unless @waiting.include?(Thread.current)
|
||
@mutex.sleep
|
||
else
|
||
return @que.shift
|