summaryrefslogtreecommitdiff
path: root/lib/thread.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/thread.rb')
-rw-r--r--lib/thread.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/thread.rb b/lib/thread.rb
index ec75144..4e6d765 100644
--- a/lib/thread.rb
+++ b/lib/thread.rb
@@ -144,6 +144,10 @@ class Queue
@que.length == 0
end
+ def clear
+ @que.replace([])
+ end
+
def length
@que.length
end