summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-11 08:37:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-11 08:37:44 +0000
commite2b10b6d131425c395c5fe286ce6fd55d46f7c51 (patch)
tree4a8fb27c43ffbbfb6e5d9ceef71a048a162b3c48 /thread.c
parenta678de48c5d22bcceda459401bf74a9c7578ab7a (diff)
thread_pthread.c: timer thread flag
* thread_pthread.c (timer_thread): add a flag to tell timer thread is created, since 0 may be a valid value as pthread_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46405 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 2d64e5384c..8a84561b65 100644
--- a/thread.c
+++ b/thread.c
@@ -3725,7 +3725,7 @@ timer_thread_function(void *arg)
void
rb_thread_stop_timer_thread(int close_anyway)
{
- if (timer_thread_id && native_stop_timer_thread(close_anyway)) {
+ if (TIMER_THREAD_CREATED_P() && native_stop_timer_thread(close_anyway)) {
native_reset_timer_thread();
}
}