summaryrefslogtreecommitdiff
path: root/lib/thread.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/thread.rb')
-rw-r--r--lib/thread.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/thread.rb b/lib/thread.rb
index 39c3e02..22610f2 100644
--- a/lib/thread.rb
+++ b/lib/thread.rb
@@ -62,10 +62,10 @@ class Mutex
def unlock
return unless @locked
- Thread.critical = TRUE
+ Thread.critical = true
t = @waiting.shift
- @locked = FALSE
- Thread.critical = FALSE
+ @locked = false
+ Thread.critical = false
t.run if t
self
end
@@ -192,14 +192,14 @@ class SizedQueue<Queue
end
def max=(max)
- Thread.critical = TRUE
+ Thread.critical = true
if @max >= max
@max = max
- Thread.critical = FALSE
+ Thread.critical = false
else
diff = max - @max
@max = max
- Thread.critical = FALSE
+ Thread.critical = false
diff.times do
t = @queue_wait.shift
t.run if t