mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/thread.rb (ConditionVariable#wait): ensure to remove the current
thread from waiters. [ruby-core:29835] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cb61fcb988
commit
f4053cf555
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon May 10 02:07:20 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* lib/thread.rb (ConditionVariable#wait): ensure to remove the current
|
||||
thread from waiters. [ruby-core:29835]
|
||||
|
||||
Mon May 10 00:54:15 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/io/console/console.c (console_set_raw): new method.
|
||||
|
|
|
@ -69,6 +69,10 @@ class ConditionVariable
|
|||
@waiters.push(Thread.current)
|
||||
end
|
||||
mutex.sleep timeout
|
||||
ensure
|
||||
@waiters_mutex.synchronize do
|
||||
@waiters.delete(Thread.current)
|
||||
end
|
||||
end
|
||||
self
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue