mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add test for [ruby-dev:32566].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ad89f7e6d2
commit
328e6a02bf
1 changed files with 15 additions and 0 deletions
|
@ -17,3 +17,18 @@ assert_equal 'ok', %q{
|
|||
:ok
|
||||
}, '[ruby-dev:32525]'
|
||||
|
||||
assert_finish 2, %q{
|
||||
require "io/nonblock"
|
||||
r, w = IO.pipe
|
||||
w.nonblock = true
|
||||
w.write_nonblock("a" * 100000)
|
||||
w.nonblock = false
|
||||
t1 = Thread.new { w.write("b" * 4096) }
|
||||
t2 = Thread.new { w.write("c" * 4096) }
|
||||
sleep 0.5
|
||||
r.sysread(4096).length
|
||||
sleep 0.5
|
||||
r.sysread(4096).length
|
||||
t1.join
|
||||
t2.join
|
||||
}, '[ruby-dev:32566]'
|
||||
|
|
Loading…
Reference in a new issue