From 253938067a37d7ba9751ec1afbbd6033f886cab4 Mon Sep 17 00:00:00 2001 From: kosaki Date: Mon, 26 Nov 2012 22:49:36 +0000 Subject: [PATCH] * thread.c (rb_thread_terminate_all): add RUBY_VM_CHECK_INTS_BLOCKING(). Otherwise the loop in this function behave as busy loop because native_sleep() return immediately when RUBY_VM_INTERRUPTED() is true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ thread.c | 1 + 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3e0e4033d6..432a3dc7c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Nov 27 07:47:09 2012 KOSAKI Motohiro + + * thread.c (rb_thread_terminate_all): add RUBY_VM_CHECK_INTS_BLOCKING(). + Otherwise the loop in this function behave as busy loop because + native_sleep() return immediately when RUBY_VM_INTERRUPTED() is true. + Tue Nov 27 04:12:49 2012 Nobuyoshi Nakada * ext/extmk.rb (extmake): git rid of post-1.8 features for cross diff --git a/thread.c b/thread.c index 878464186e..ed8d429ef8 100644 --- a/thread.c +++ b/thread.c @@ -386,6 +386,7 @@ rb_thread_terminate_all(void) PUSH_TAG(); if (EXEC_TAG() == 0) { native_sleep(th, 0); + RUBY_VM_CHECK_INTS_BLOCKING(th); } else { /* ignore exception */