зеркало из https://github.com/github/ruby.git
* thread.c (thread_cleanup_func): Moved interrupted_lock
destroying code from native_thread_destroy() to thread_cleanup_func() because it's platform independent logic. * thread_win32.c (native_thread_destroy): ditto. * thread_pthread.c (native_thread_destroy): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
49fbf28b45
Коммит
1ff6a1953c
|
@ -1,3 +1,12 @@
|
|||
Tue Dec 21 00:59:40 2010 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* thread.c (thread_cleanup_func): Moved interrupted_lock
|
||||
destroying code from native_thread_destroy() to
|
||||
thread_cleanup_func() because it's platform independent logic.
|
||||
|
||||
* thread_win32.c (native_thread_destroy): ditto.
|
||||
* thread_pthread.c (native_thread_destroy): ditto.
|
||||
|
||||
Tue Dec 21 00:46:20 2010 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* thread.c (thread_cleanup_func): Don't touch native threading
|
||||
|
|
1
thread.c
1
thread.c
|
@ -406,6 +406,7 @@ thread_cleanup_func(void *th_ptr, int atfork)
|
|||
if (atfork)
|
||||
return;
|
||||
|
||||
native_mutex_destroy(&th->interrupt_lock);
|
||||
native_thread_destroy(th);
|
||||
}
|
||||
|
||||
|
|
|
@ -339,7 +339,6 @@ native_thread_init(rb_thread_t *th)
|
|||
static void
|
||||
native_thread_destroy(rb_thread_t *th)
|
||||
{
|
||||
pthread_mutex_destroy(&th->interrupt_lock);
|
||||
pthread_cond_destroy(&th->native_thread_data.gvl_cond);
|
||||
pthread_cond_destroy(&th->native_thread_data.sleep_cond);
|
||||
}
|
||||
|
|
|
@ -511,7 +511,6 @@ static void
|
|||
native_thread_destroy(rb_thread_t *th)
|
||||
{
|
||||
HANDLE intr = InterlockedExchangePointer(&th->native_thread_data.interrupt_event, 0);
|
||||
native_mutex_destroy(&th->interrupt_lock);
|
||||
thread_debug("close handle - intr: %p, thid: %p\n", intr, th->thread_id);
|
||||
w32_close_handle(intr);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче