Permalink
Browse files

fix race condition in spec

  • Loading branch information...
1 parent a28212b commit 33315ee3d001f503247338e6688e762a9ab4f332 @rkh committed Oct 27, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 spec/lock_spec.rb
View
@@ -18,7 +18,9 @@ def synchronize(&block)
end
it 'locks for other threads' do
- a = Thread.new { synchronize { sleep(0.1) and track << :first } }
+ a = Thread.new { synchronize { sleep(0.2) and track << :first } }
+
+ sleep 0.1
b = Thread.new { synchronize { track << :second } }
a.join

0 comments on commit 33315ee

Please sign in to comment.