diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-04 05:00:52 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-04 05:00:52 +0000 |
commit | c5632105323a2ed48cb319de74d7e938e62b0a21 () | |
tree | 3a36a91aa67a877d5fda74adeafa79f44bd4017d | |
parent | 5ff72d05693bbb2aba9094144b6ee8d8da77f1ca (diff) |
use Queue for inter-thread synchronization.
* test/ruby/test_bignum.rb (test_interrupt_during_to_s): should not use "while" synchronization, but should use Queue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_bignum.rb | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -615,14 +615,15 @@ class TestBignum < Test::Unit::TestCase start_flag = false end_flag = false num = (65536 ** 65536) thread = Thread.new do - start_flag = true assert_raise(RuntimeError) { num.to_s end_flag = true } end - sleep 0.001 until start_flag thread.raise thread.join time = Time.now - time |