mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 09:33:59 +02:00
merges r22765 from trunk into ruby_1_9_1.
-- * lib/thread.rb (SizedQueue#push): fix limit condition. [ruby-dev:38135] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
08f7b02721
commit
3f12adfa6c
2 changed files with 6 additions and 1 deletions
|
@ -292,7 +292,7 @@ class SizedQueue < Queue
|
|||
t = nil
|
||||
@mutex.synchronize{
|
||||
while true
|
||||
break if @que.length <= @max
|
||||
break if @que.length < @max
|
||||
@queue_wait.push Thread.current
|
||||
@mutex.sleep
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue