ruby-changes:34553
From: naruse <ko1@a...>
Date: Tue, 1 Jul 2014 12:16:38 +0900 (JST)
Subject: [ruby-changes:34553] naruse:r46634 (trunk): add timeout
naruse 2014-07-01 12:16:33 +0900 (Tue, 01 Jul 2014) New Revision: 46634 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46634 Log: add timeout Modified files: trunk/test/thread/test_cv.rb Index: test/thread/test_cv.rb =================================================================== --- test/thread/test_cv.rb (revision 46633) +++ test/thread/test_cv.rb (revision 46634) @@ -74,8 +74,10 @@ class TestConditionVariable < Test::Unit https://github.com/ruby/ruby/blob/trunk/test/thread/test_cv.rb#L74 condvar.broadcast result << "P2" end - nr_threads.times do |i| - threads[i].join + Timeout.timeout(5) do + nr_threads.times do |i| + threads[i].join + end end assert_equal ["C1", "C1", "C1", "P1", "P2", "C2", "C2", "C2"], result -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/