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:
parent
5b75a0614f
commit
ab4c6921cb
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue