3 t1 = Thread.new { r.sysread(1) }
4 t2 = Thread.new { r.sysread(1) }
16 w.write_nonblock("a" * 100000)
18 t1 = Thread.new { w.write("b" * 4096) }
19 t2 = Thread.new { w.write("c" * 4096) }
21 r.sysread(4096).length
23 r.sysread(4096).length
40 assert_equal 'ok', %q{
43 tmpname = "#{Dir.tmpdir}/ruby-btest-#{$$}-#{rand(0x100000000).to_s(36)}"
44 rw = File.open(tmpname, File::RDWR|File::CREAT|File::EXCL)
56 assert_equal 'ok', %q{
59 tmpname = "#{Dir.tmpdir}/ruby-btest-#{$$}-#{rand(0x100000000).to_s(36)}"
60 rw = File.open(tmpname, File::RDWR|File::CREAT|File::EXCL)
73 assert_normal_exit %q{
74 ARGF.set_encoding "foo"
78 assert_normal_exit %q{
81 megacontent = "abc" * 12345678
82 File.open("megasrc", "w") {|f| f << megacontent }
84 Thread.new { sleep rand*0.2; Process.kill(:INT, $$) }
88 t1 = Thread.new { w1 << megacontent; w1.close }
89 t2 = Thread.new { r2.read }
90 IO.copy_stream(r1, w2) rescue nil
93 }, '', ["INT"] or break