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

ruby-changes:20017

From: akr <ko1@a...>
Date: Mon, 13 Jun 2011 23:22:28 +0900 (JST)
Subject: [ruby-changes:20017] akr:r32063 (trunk): * test/socket/test_unix.rb: don't use Thread.abort_on_exception.

akr	2011-06-13 23:12:23 +0900 (Mon, 13 Jun 2011)

  New Revision: 32063

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

  Log:
    * test/socket/test_unix.rb: don't use Thread.abort_on_exception.

  Modified files:
    trunk/ChangeLog
    trunk/test/socket/test_unix.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32062)
+++ ChangeLog	(revision 32063)
@@ -1,3 +1,7 @@
+Mon Jun 13 23:11:52 2011  Tanaka Akira  <akr@f...>
+
+	* test/socket/test_unix.rb: don't use Thread.abort_on_exception.
+
 Mon Jun 13 23:05:01 2011  Tanaka Akira  <akr@f...>
 
 	* ext/socket/unixsocket.c (unix_send_io): race condition fixed.
Index: test/socket/test_unix.rb
===================================================================
--- test/socket/test_unix.rb	(revision 32062)
+++ test/socket/test_unix.rb	(revision 32063)
@@ -108,8 +108,6 @@
     r1, w = IO.pipe
     s1, s2 = UNIXSocket.pair
     s1.nonblock = s2.nonblock = true
-    aoe = Thread.abort_on_exception
-    Thread.abort_on_exception = true
     lock = Mutex.new
     nr = 0
     x = 2
@@ -125,13 +123,13 @@
             s2.recv_io.close
             lock.synchronize { nr += 1 }
           end
+          true
         end
       end
       (x * y).times { s1.send_io r1 }
-      thrs.each { |t| t.join }
+      assert_equal([true]*x, thrs.map { |t| t.value })
       assert_equal x * y, nr
     ensure
-      Thread.abort_on_exception = aoe
       s1.close
       s2.close
       w.close

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

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