summaryrefslogtreecommitdiff
path: root/ruby_2_2/benchmark/bm_vm_thread_queue.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ruby_2_2/benchmark/bm_vm_thread_queue.rb')
-rw-r--r--ruby_2_2/benchmark/bm_vm_thread_queue.rb18
1 files changed, 0 insertions, 18 deletions
diff --git a/ruby_2_2/benchmark/bm_vm_thread_queue.rb b/ruby_2_2/benchmark/bm_vm_thread_queue.rb
deleted file mode 100644
index 37381ae62b..0000000000
--- a/ruby_2_2/benchmark/bm_vm_thread_queue.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-require 'thread'
-
-n = 1_000_000
-q = Queue.new
-consumer = Thread.new{
- while q.pop
- # consuming
- end
-}
-
-producer = Thread.new{
- n.times{
- q.push true
- }
- q.push nil
-}
-
-consumer.join