summaryrefslogtreecommitdiff
path: root/trunk/benchmark/bm_vm2_mutex.rb
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/benchmark/bm_vm2_mutex.rb')
-rw-r--r--trunk/benchmark/bm_vm2_mutex.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/trunk/benchmark/bm_vm2_mutex.rb b/trunk/benchmark/bm_vm2_mutex.rb
new file mode 100644
index 0000000000..9ec1a0f136
--- /dev/null
+++ b/trunk/benchmark/bm_vm2_mutex.rb
@@ -0,0 +1,9 @@
+require 'thread'
+
+m = Mutex.new
+
+i=0
+while i<6000000 # benchmark loop 2
+ i+=1
+ m.synchronize{}
+end