aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
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 ca47419644..f6bcc9801f 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;
}