aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/bm_vm3_thread_mutex2.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-13 14:05:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-13 14:05:56 +0000
commita72f0334472ab7f51d62d7eff6b13dc4c7f7002f (patch)
tree428dd783019d7991466f2309a3b43e361e18caeb /benchmark/bm_vm3_thread_mutex2.rb
parente3672626bf0de4d7b65e539caf575a5dfac7a048 (diff)
downloadruby-a72f0334472ab7f51d62d7eff6b13dc4c7f7002f.tar.gz
* properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark/bm_vm3_thread_mutex2.rb')
-rw-r--r--benchmark/bm_vm3_thread_mutex2.rb42
1 files changed, 21 insertions, 21 deletions
diff --git a/benchmark/bm_vm3_thread_mutex2.rb b/benchmark/bm_vm3_thread_mutex2.rb
index 2903845c3e..a74e2fd490 100644
--- a/benchmark/bm_vm3_thread_mutex2.rb
+++ b/benchmark/bm_vm3_thread_mutex2.rb
@@ -1,21 +1,21 @@
-# two threads, one mutex
-
-require 'thread'
-m = Mutex.new
-r = 0
-max = 1000
-lmax = (max * max)/2
-(1..2).map{
- Thread.new{
- i=0
- while i<lmax
- i+=1
- m.synchronize{
- r += 1
- }
- end
- }
-}.each{|e|
- e.join
-}
-raise r.to_s if r != max * max
+# two threads, one mutex
+
+require 'thread'
+m = Mutex.new
+r = 0
+max = 1000
+lmax = (max * max)/2
+(1..2).map{
+ Thread.new{
+ i=0
+ while i<lmax
+ i+=1
+ m.synchronize{
+ r += 1
+ }
+ end
+ }
+}.each{|e|
+ e.join
+}
+raise r.to_s if r != max * max