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

Join a thread.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2014-06-05 09:16:57 +00:00
parent 72a77c25e5
commit 88fda023aa

View file

@ -29,7 +29,7 @@ class TestIONonblock < Test::Unit::TestCase
w << "a" * 4096 w << "a" * 4096
result = "" result = ""
timeout(10) { timeout(10) {
Thread.new { t0 = Thread.new {
Thread.pass Thread.pass
w.close w.close
} }
@ -44,6 +44,7 @@ class TestIONonblock < Test::Unit::TestCase
# ignore [ruby-dev:35638] # ignore [ruby-dev:35638]
end end
assert_nothing_raised {t.join} assert_nothing_raised {t.join}
t0.join
} }
assert_equal(4097, result.size) assert_equal(4097, result.size)
true true