1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Join threads.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2014-05-30 13:48:06 +00:00
parent 5b75a0614f
commit ab4c6921cb

View file

@ -62,13 +62,17 @@ class TestIOWait < Test::Unit::TestCase
end
def test_wait_forever
Thread.new { sleep 0.01; @w.syswrite "." }
th = Thread.new { sleep 0.01; @w.syswrite "." }
assert_equal @r, @r.wait
ensure
th.join
end
def test_wait_eof
Thread.new { sleep 0.01; @w.close }
th = Thread.new { sleep 0.01; @w.close }
assert_nil @r.wait
ensure
th.join
end
def test_wait_writable