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

ruby-changes:7078

From: ko1 <ko1@a...>
Date: Thu, 14 Aug 2008 06:27:02 +0900 (JST)
Subject: [ruby-changes:7078] Ruby:r18596 (trunk): * thread.c (rb_thread_execute_interrupts): switch event

ko1	2008-08-14 06:26:49 +0900 (Thu, 14 Aug 2008)

  New Revision: 18596

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

  Log:
    * thread.c (rb_thread_execute_interrupts): switch event
      should be occur only once.

  Modified files:
    trunk/ChangeLog
    trunk/thread.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 18595)
+++ ChangeLog	(revision 18596)
@@ -1,3 +1,8 @@
+Thu Aug 14 06:09:12 2008  Koichi Sasada  <ko1@a...>
+
+	* thread.c (rb_thread_execute_interrupts): switch event
+	  should be occur only once.
+
 Thu Aug 14 05:36:36 2008  NARUSE, Yui  <naruse@r...>
 
 	* common.mk: parse.h depends on parse.c.
Index: thread.c
===================================================================
--- thread.c	(revision 18595)
+++ thread.c	(revision 18596)
@@ -1015,16 +1015,13 @@
 	}
 
 	if (timer_interrupt) {
-#if USE_NATIVE_THREAD_PRIORITY
 	    EXEC_EVENT_HOOK(th, RUBY_EVENT_SWITCH, th->cfp->self, 0, 0);
-	    rb_thread_schedule();
-#else
+
 	    if (th->slice > 0) {
 		th->slice--;
 	    }
 	    else {
 	      reschedule:
-		EXEC_EVENT_HOOK(th, RUBY_EVENT_SWITCH, th->cfp->self, 0, 0);
 		rb_thread_schedule();
 		if (th->slice < 0) {
 		    th->slice++;
@@ -1034,7 +1031,6 @@
 		    th->slice = th->priority;
 		}
 	    }
-#endif
 	}
     }
 }

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

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