diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/thread.rb | 8 | ||||
-rw-r--r-- | lib/tk.rb | 2 |
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 @@ -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 |