mirror of
https://github.com/ruby/ruby.git
synced 2025-09-18 18:13:58 +02:00
* 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:
parent
1433c13b25
commit
a3419bc919
3 changed files with 56 additions and 32 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue