* io.c (io_flush_buffer): write and buffer operations should be

monolithic.  [ruby-core:31348]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-07-20 03:50:41 +00:00
parent 1433c13b25
commit a3419bc919
3 changed files with 56 additions and 32 deletions

View file

@ -1609,4 +1609,18 @@ End
t.close
assert_raise(IOError) {t.binmode}
end
def test_threaded_flush
bug3585 = '[ruby-core:31348]'
src = %q{\
t = Thread.new { sleep 3 }
Thread.new {sleep 1; t.kill; p 'hi!'}
t.join
}.gsub(/^\s+/, '')
10.times.map do
Thread.start do
assert_in_out_err([], src, [%q["hi!"]])
end
end.each {|th| th.join}
end
end