mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/lbtest.rb: print at once including newlines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
28cc4f7543
commit
efd6f6b856
1 changed files with 4 additions and 4 deletions
|
@ -36,13 +36,13 @@ lb = LocalBarrier.new(n)
|
|||
(n - 1).times do |i|
|
||||
Thread.start do
|
||||
sleep((rand(n) + 1) / 10.0)
|
||||
puts "#{i}: done"
|
||||
print "#{i}: done\n"
|
||||
lb.sync
|
||||
puts "#{i}: cont"
|
||||
print "#{i}: cont\n"
|
||||
end
|
||||
end
|
||||
|
||||
lb.sync
|
||||
puts "#{n-1}: cone"
|
||||
print "#{n-1}: cone\n"
|
||||
|
||||
puts "exit."
|
||||
print "exit.\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue