summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/thread.rb8
-rw-r--r--lib/tk.rb2
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/thread.rb b/lib/thread.rb
index 8f7f6cdd6a..c47d7b20a4 100644
--- a/lib/thread.rb
+++ b/lib/thread.rb
@@ -69,6 +69,10 @@ class Mutex
unlock
end
end
+
+ def num_waiting
+ @waiting.size
+ end
end
class Queue
@@ -137,4 +141,8 @@ class SizedQueue<Queue
pop = super
pop
end
+
+ def num_waiting
+ @waiting.size + @queue_wait.size
+ end
end
diff --git a/lib/tk.rb b/lib/tk.rb
index 5a3bf2052b..8d2e3b1f0e 100644
--- a/lib/tk.rb
+++ b/lib/tk.rb
@@ -26,7 +26,7 @@ module TkComm
private :error_at
def tk_tcl2ruby(val)
- if val.include? ?
+ if val.include? ?\s
return val.split.collect{|v| tk_tcl2ruby(v)}
end
case val