aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/bm_vm2_mutex.rb2
-rw-r--r--benchmark/bm_vm_thread_mutex1.rb2
-rw-r--r--benchmark/bm_vm_thread_mutex2.rb2
-rw-r--r--benchmark/bm_vm_thread_mutex3.rb2
-rw-r--r--benchmark/bm_vm_thread_queue.rb2
5 files changed, 5 insertions, 5 deletions
diff --git a/benchmark/bm_vm2_mutex.rb b/benchmark/bm_vm2_mutex.rb
index 7362f738c5..5d16480c6b 100644
--- a/benchmark/bm_vm2_mutex.rb
+++ b/benchmark/bm_vm2_mutex.rb
@@ -1,6 +1,6 @@
require 'thread'
-m = Mutex.new
+m = Thread::Mutex.new
i = 0
while i<6_000_000 # benchmark loop 2
diff --git a/benchmark/bm_vm_thread_mutex1.rb b/benchmark/bm_vm_thread_mutex1.rb
index 5c9f85dfb7..66e42c85e1 100644
--- a/benchmark/bm_vm_thread_mutex1.rb
+++ b/benchmark/bm_vm_thread_mutex1.rb
@@ -1,7 +1,7 @@
# one thread, one mutex (no contention)
require 'thread'
-m = Mutex.new
+m = Thread::Mutex.new
r = 0
max = 2000
lmax = max * max
diff --git a/benchmark/bm_vm_thread_mutex2.rb b/benchmark/bm_vm_thread_mutex2.rb
index 10de59054f..6e6c804c31 100644
--- a/benchmark/bm_vm_thread_mutex2.rb
+++ b/benchmark/bm_vm_thread_mutex2.rb
@@ -1,7 +1,7 @@
# two threads, one mutex
require 'thread'
-m = Mutex.new
+m = Thread::Mutex.new
r = 0
max = 2000
lmax = (max * max)/2
diff --git a/benchmark/bm_vm_thread_mutex3.rb b/benchmark/bm_vm_thread_mutex3.rb
index 7f9a44b39d..c750dc542a 100644
--- a/benchmark/bm_vm_thread_mutex3.rb
+++ b/benchmark/bm_vm_thread_mutex3.rb
@@ -1,7 +1,7 @@
# 1000 threads, one mutex
require 'thread'
-m = Mutex.new
+m = Thread::Mutex.new
r = 0
max = 2000
(1..max).map{
diff --git a/benchmark/bm_vm_thread_queue.rb b/benchmark/bm_vm_thread_queue.rb
index 37381ae62b..274ceda366 100644
--- a/benchmark/bm_vm_thread_queue.rb
+++ b/benchmark/bm_vm_thread_queue.rb
@@ -1,7 +1,7 @@
require 'thread'
n = 1_000_000
-q = Queue.new
+q = Thread::Queue.new
consumer = Thread.new{
while q.pop
# consuming