Project

General

Profile

Bug #5195 » patch.diff

Glass_saga (Masaki Matsushita), 08/16/2011 10:18 PM

View differences:

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
    (1-1/1)