зеркало из https://github.com/github/ruby.git
Join threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
5b75a0614f
Коммит
ab4c6921cb
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче