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

* test/ruby/test_io.rb (TestIO#test_readpartial_lock),

(TestIO#test_read_lock): get rid of GVL fairness problem.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-05-07 14:52:54 +00:00
parent 76734388a2
commit 21fcb1c3a1

View file

@ -904,7 +904,7 @@ class TestIO < Test::Unit::TestCase
with_pipe do |r, w|
s = ""
t = Thread.new { r.readpartial(5, s) }
0 until s.size == 5
Thread.pass until s.size == 5
assert_raise(RuntimeError) { s.clear }
w.write "foobarbaz"
w.close
@ -939,7 +939,7 @@ class TestIO < Test::Unit::TestCase
with_pipe do |r, w|
s = ""
t = Thread.new { r.read(5, s) }
0 until s.size == 5
Thread.pass until s.size == 5
assert_raise(RuntimeError) { s.clear }
w.write "foobarbaz"
w.close