diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-08 15:31:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-08 15:31:05 +0000 |
commit | de3992e2687c9ac745d9201c93af84cdd1255c8f (patch) | |
tree | 555a72d40d2a2645020a675fc085b716dd097f2b /thread_win32.c | |
parent | 6e2b1f0df540ce889f14e6d4e02910b88461a169 (diff) | |
download | ruby-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_win32.c')
-rw-r--r-- | thread_win32.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/thread_win32.c b/thread_win32.c index feba5ecfc..0befbff4a 100644 --- a/thread_win32.c +++ b/thread_win32.c @@ -558,6 +558,15 @@ rb_thread_create_timer_thread(void) } } -#define native_stop_timer_thread() (CloseHandle(timer_thread_lock), timer_thread_lock = 0) +static int +native_stop_timer_thread(void) +{ + int stopped = --system_working <= 0; + if (stopped) { + CloseHandle(timer_thread_lock); + timer_thread_lock = 0; + } + return stopped; +} #endif /* THREAD_SYSTEM_DEPENDENT_IMPLEMENTATION */ |