diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-05-12 09:07:57 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-05-12 09:07:57 +0000 |
| commit | a6dcd4ff38476c301f3385a3999fb6452bd462c7 (patch) | |
| tree | c0805e6c95d6396e28e6129d88905c4dee085f4e /lib/thread.rb | |
| parent | 23d67024ca56858b2fd6bfb95156f2355bc0a2b5 (diff) | |
| download | ruby-a6dcd4ff38476c301f3385a3999fb6452bd462c7.tar.gz ruby-a6dcd4ff38476c301f3385a3999fb6452bd462c7.tar.xz ruby-a6dcd4ff38476c301f3385a3999fb6452bd462c7.zip | |
2000-05-12
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/thread.rb')
| -rw-r--r-- | lib/thread.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/thread.rb b/lib/thread.rb index 20ce6aef5..a0e6967a2 100644 --- a/lib/thread.rb +++ b/lib/thread.rb @@ -157,8 +157,10 @@ class Queue t.wakeup if t rescue ThreadError retry + ensure + Thread.critical = false end - Thread.critical = false + t.run if t end alias enq push @@ -250,10 +252,13 @@ class SizedQueue<Queue if @que.length < @max begin t = @queue_wait.shift - t.run if t + t.wakeup if t rescue ThreadError retry + ensure + Thread.critical = false end + t.run if t end super end |
