[前][次][番号順一覧][スレッド一覧]

ruby-changes:23043

From: nobu <ko1@a...>
Date: Tue, 20 Mar 2012 22:55:18 +0900 (JST)
Subject: [ruby-changes:23043] nobu:r35093 (trunk): test_thread: test_condvar_wait_not_owner duplicates test_condvar_nolock

nobu	2012-03-20 22:54:59 +0900 (Tue, 20 Mar 2012)

  New Revision: 35093

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35093

  Log:
    test_thread: test_condvar_wait_not_owner duplicates test_condvar_nolock

  Modified files:
    trunk/lib/thread.rb
    trunk/test/ruby/test_thread.rb

Index: lib/thread.rb
===================================================================
--- lib/thread.rb	(revision 35092)
+++ lib/thread.rb	(revision 35093)
@@ -82,7 +82,7 @@
   #
   def signal
     begin
-      t = @waiters_mutex.synchronize { @waiters.shift }
+      t = @waiters_mutex.synchronize {@waiters.shift}
       t.run if t
     rescue ThreadError
       retry
Index: test/ruby/test_thread.rb
===================================================================
--- test/ruby/test_thread.rb	(revision 35092)
+++ test/ruby/test_thread.rb	(revision 35093)
@@ -67,13 +67,6 @@
     assert_equal([0, 1, 2], result)
   end
 
-  def test_condvar_wait_not_owner
-    mutex = Mutex.new
-    condvar = ConditionVariable.new
-
-    assert_raise(ThreadError) { condvar.wait(mutex) }
-  end
-
   def test_condvar_wait_exception_handling
     # Calling wait in the only thread running should raise a ThreadError of
     # 'stopping only thread'
@@ -194,7 +187,7 @@
     mutex = Mutex.new
     condvar = ConditionVariable.new
 
-    assert_raise(ThreadError) { condvar.wait(mutex) }
+    assert_raise(ThreadError) {condvar.wait(mutex)}
   end
 
   def test_condvar_nolock_2

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]