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 | 641f43de973d51a7d463b067833d4a71706d6c5c (patch) | |
tree | 555a72d40d2a2645020a675fc085b716dd097f2b /thread_win32.c | |
parent | b2390fb1cc3f38ca4516394034c8680eeb01a64c (diff) |
* thread_pthread.c (thread_timer): checks working flags again.
git-svn-id: svn+ssh://ci.ruby-lang.org/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 feba5ecfcc..0befbff4ae 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 */ |