From ee755e2ce96c515336d65ea318692998fcf1547d Mon Sep 17 00:00:00 2001 From: naruse Date: Sun, 22 Jul 2012 15:04:11 +0000 Subject: * thread.c (rb_threadptr_execute_interrupts_common): increase running_time_us on THREAD_TO_KILL like on THREAD_RUNNABLE. This cause not to siwtch from a thread which is to be killed on FreeBSD and Mac OS X. see also the test. This issue maybe exist for long time but happens after r36430. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'thread.c') diff --git a/thread.c b/thread.c index acd9ac4a0b..1cc13a87dd 100644 --- a/thread.c +++ b/thread.c @@ -1742,7 +1742,7 @@ rb_threadptr_execute_interrupts_common(rb_thread_t *th, int blocking_timing) else limits_us >>= -th->priority; - if (status == THREAD_RUNNABLE) + if (status == THREAD_RUNNABLE || status == THREAD_TO_KILL) th->running_time_us += TIME_QUANTUM_USEC; EXEC_EVENT_HOOK(th, RUBY_EVENT_SWITCH, th->cfp->self, 0, 0); -- cgit v1.2.3