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

ruby-changes:13745

From: yugui <ko1@a...>
Date: Wed, 28 Oct 2009 23:15:56 +0900 (JST)
Subject: [ruby-changes:13745] Ruby:r25539 (ruby_1_9_1): merges r24591 from trunk into ruby_1_9_1.

yugui	2009-10-28 23:15:39 +0900 (Wed, 28 Oct 2009)

  New Revision: 25539

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

  Log:
    merges r24591 from trunk into ruby_1_9_1.
    --
    * thread.c (rb_thread_terminate_all): do not ignore interrupt when
      reaping threads on termination.  [ruby-dev:39107]

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/thread.c
    branches/ruby_1_9_1/version.h

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 25538)
+++ ruby_1_9_1/ChangeLog	(revision 25539)
@@ -1,3 +1,8 @@
+Thu Aug 20 08:39:50 2009  Yukihiro Matsumoto  <matz@r...>
+
+	* thread.c (rb_thread_terminate_all): do not ignore interrupt when
+	  reaping threads on termination.  [ruby-dev:39107]
+
 Thu Aug 20 01:06:48 2009  Yukihiro Matsumoto  <matz@r...>
 
 	* dir.c (DEFINE_STRUCT_DIRENT): use union to allocate sufficient
Index: ruby_1_9_1/thread.c
===================================================================
--- ruby_1_9_1/thread.c	(revision 25538)
+++ ruby_1_9_1/thread.c	(revision 25539)
@@ -298,6 +298,9 @@
 {
     rb_thread_t *th = GET_THREAD(); /* main thread */
     rb_vm_t *vm = th->vm;
+    VALUE einfo = vm->main_thread->errinfo;
+    int state;
+
     if (vm->main_thread != th) {
 	rb_bug("rb_thread_terminate_all: called by child thread (%p, %p)",
 	       (void *)vm->main_thread, (void *)th);
@@ -313,13 +316,14 @@
 
     while (!rb_thread_alone()) {
 	PUSH_TAG();
-	if (EXEC_TAG() == 0) {
+	if ((state = EXEC_TAG()) == 0) {
 	    rb_thread_schedule();
 	}
-	else {
-	    /* ignore exception */
+	POP_TAG();
+	if (state && einfo != vm->main_thread->errinfo &&
+	    RUBY_VM_SET_INTERRUPT(vm->main_thread)) {
+	    break;
 	}
-	POP_TAG();
     }
     rb_thread_stop_timer_thread();
 }
Index: ruby_1_9_1/version.h
===================================================================
--- ruby_1_9_1/version.h	(revision 25538)
+++ ruby_1_9_1/version.h	(revision 25539)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.1"
-#define RUBY_PATCHLEVEL 298
+#define RUBY_PATCHLEVEL 299
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1

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

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