summaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-08 15:31:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-08 15:31:05 +0000
commitde3992e2687c9ac745d9201c93af84cdd1255c8f (patch)
tree555a72d40d2a2645020a675fc085b716dd097f2b /thread.c
parent6e2b1f0df540ce889f14e6d4e02910b88461a169 (diff)
downloadruby-de3992e2687c9ac745d9201c93af84cdd1255c8f.tar.gz
ruby-de3992e2687c9ac745d9201c93af84cdd1255c8f.tar.xz
ruby-de3992e2687c9ac745d9201c93af84cdd1255c8f.zip
* thread_pthread.c (thread_timer): checks working flags again.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread.c b/thread.c
index ca4741964..f6bcc9801 100644
--- a/thread.c
+++ b/thread.c
@@ -75,6 +75,7 @@ void rb_thread_stop_timer_thread(void);
static const VALUE eKillSignal = INT2FIX(0);
static const VALUE eTerminateSignal = INT2FIX(1);
+static volatile int system_working = 1;
inline static void
st_delete_wrap(st_table *table, st_data_t key)
@@ -2355,8 +2356,7 @@ timer_thread_function(void *arg)
void
rb_thread_stop_timer_thread(void)
{
- if (timer_thread_id) {
- native_stop_timer_thread();
+ if (timer_thread_id && native_stop_timer_thread()) {
native_thread_join(timer_thread_id);
timer_thread_id = 0;
}