summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-01 08:28:44 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-01 08:28:44 +0000
commit1f1db611b9860291454f38459f2aed33e0877d84 (patch)
tree711d9dec916e0b854ec15d849b53bd5b69eca011 /test
parentf9aef18497c42d704657566ab2f99b089dea01ae (diff)
* lib/thread.rb (ConditionVariable): use hash instead of array for
@waiters. * test/thread/test_queue.rb (test_sized_queue_and_wakeup): remove a test because @waiters no longer have a chance to duplicated. Now it's a hash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/thread/test_queue.rb18
1 files changed, 0 insertions, 18 deletions
diff --git a/test/thread/test_queue.rb b/test/thread/test_queue.rb
index b6fbbae..ec74377 100644
--- a/test/thread/test_queue.rb
+++ b/test/thread/test_queue.rb
@@ -56,24 +56,6 @@ class TestQueue < Test::Unit::TestCase
assert_equal(1, q.max)
end
- def test_sized_queue_and_wakeup
- sq = SizedQueue.new(1)
- sq.push(0)
-
- t1 = Thread.start { sq.push(1) ; sleep }
-
- sleep 0.1 until t1.stop?
- t1.wakeup
- sleep 0.1 until t1.stop?
-
- t2 = Thread.start { sq.push(2) }
- sleep 0.1 until t1.stop? && t2.stop?
-
- enque_cond = sq.instance_eval{ @enque_cond }
- queue_wait = enque_cond.instance_eval { @waiters }
- assert_equal(queue_wait.uniq, queue_wait)
- end
-
def test_queue_pop_interrupt
q = Queue.new
t1 = Thread.new { q.pop }