diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-27 05:43:40 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-27 05:43:40 +0000 |
commit | e1e25923240975bedc8b087736d39105fc6f91a1 (patch) | |
tree | 961141b42e33c7b7e22a48afaf3d0bec029372ce /lib | |
parent | 48943ec3ae3ad53e7dd2fc88a5faef5352658c4f (diff) |
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@95 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/finalize.rb | 2 | ||||
-rw-r--r-- | lib/thread.rb | 13 |
2 files changed, 6 insertions, 9 deletions
diff --git a/lib/finalize.rb b/lib/finalize.rb index 1482e7ae20..e479cac563 100644 --- a/lib/finalize.rb +++ b/lib/finalize.rb @@ -170,7 +170,7 @@ module Finalizer # ObjectSpace#add_finalizer¤Ø¤ÎÅÐÏ¿´Ø¿ô def final_of(id) if assocs = Dependency.delete(id) - for dependant, method, *opt in assocs + for dependant, method, opt in assocs dependant.send(method, id, *opt) end end diff --git a/lib/thread.rb b/lib/thread.rb index c33333f5f3..91c588f603 100644 --- a/lib/thread.rb +++ b/lib/thread.rb @@ -50,14 +50,11 @@ class Mutex def unlock return unless @locked - Thread.critical = true - wait = @waiting - @waiting = [] - @locked = false - Thread.critical = false - for w in wait - w.run - end + Thread.critical = TRUE + t = @waiting.shift + @locked = FALSE + Thread.critical = FALSE + t.run if t self end |