summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-22 15:04:11 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-22 15:04:11 +0000
commitee755e2ce96c515336d65ea318692998fcf1547d (patch)
tree0d8f4fc7b93624388d1e0c23753601a88c6281b1 /thread.c
parent478d37da053f39608fa505991aa69bcff4ade998 (diff)
* 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
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
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);