1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2008-11-08 15:31:05 +00:00
parent b2390fb1cc
commit 641f43de97
4 changed files with 25 additions and 7 deletions

View file

@ -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 */