summaryrefslogtreecommitdiff
path: root/benchmark/bm_vm_thread_queue.rb
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/bm_vm_thread_queue.rb')
-rw-r--r--benchmark/bm_vm_thread_queue.rb36
1 files changed, 18 insertions, 18 deletions
diff --git a/benchmark/bm_vm_thread_queue.rb b/benchmark/bm_vm_thread_queue.rb
index b3adcc2..37381ae 100644
--- a/benchmark/bm_vm_thread_queue.rb
+++ b/benchmark/bm_vm_thread_queue.rb
@@ -1,18 +1,18 @@
-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
+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