ruby-changes:19428
From: nobu <ko1@a...>
Date: Sat, 7 May 2011 23:53:00 +0900 (JST)
Subject: [ruby-changes:19428] Ruby:r31468 (trunk): * test/ruby/test_io.rb (TestIO#test_readpartial_lock),
nobu 2011-05-07 23:52:54 +0900 (Sat, 07 May 2011) New Revision: 31468 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31468 Log: * test/ruby/test_io.rb (TestIO#test_readpartial_lock), (TestIO#test_read_lock): get rid of GVL fairness problem. Modified files: trunk/test/ruby/test_io.rb Index: test/ruby/test_io.rb =================================================================== --- test/ruby/test_io.rb (revision 31467) +++ test/ruby/test_io.rb (revision 31468) @@ -904,7 +904,7 @@ 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 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/