mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/thread.rb: Synchronize with HEAD. The last change
(rev.1.9.2.2) against SizedQueue#max= was wrong and didn't fix the bug in question. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a84a284a3b
commit
227d679397
2 changed files with 12 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
Sat Jun 23 19:25:08 2001 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* lib/thread.rb: Synchronize with HEAD. The last change
|
||||
(rev.1.9.2.2) against SizedQueue#max= was wrong and didn't fix
|
||||
the bug in question.
|
||||
|
||||
Fri Jun 22 23:17:28 2001 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* ext/socket/socket.c (ruby_connect): workaround for the setup of
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# $Date$
|
||||
# by Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||
#
|
||||
# Copyright (C) 2001 Yukihiro Matsumoto
|
||||
# Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
|
||||
# Copyright (C) 2000 Information-technology Promotion Agency, Japan
|
||||
#
|
||||
|
@ -168,9 +169,8 @@ class Queue
|
|||
rescue ThreadError
|
||||
end
|
||||
end
|
||||
def enq(obj)
|
||||
push(obj)
|
||||
end
|
||||
alias << push
|
||||
alias enq push
|
||||
|
||||
def pop(non_block=false)
|
||||
Thread.critical = true
|
||||
|
@ -198,7 +198,7 @@ class Queue
|
|||
end
|
||||
|
||||
def clear
|
||||
@que.replace([])
|
||||
@que.clear
|
||||
end
|
||||
|
||||
def length
|
||||
|
@ -231,7 +231,7 @@ class SizedQueue<Queue
|
|||
@max = max
|
||||
Thread.critical = false
|
||||
else
|
||||
diff = @max - max
|
||||
diff = max - @max
|
||||
@max = max
|
||||
Thread.critical = false
|
||||
diff.times do
|
||||
|
@ -255,6 +255,7 @@ class SizedQueue<Queue
|
|||
end
|
||||
super
|
||||
end
|
||||
alias << push
|
||||
|
||||
def pop(*args)
|
||||
retval = super
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue