diff options
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index db304ba276..5e65e133f7 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -913,11 +913,11 @@ register_cached_thread_and_wait(rb_nativethread_id_t thread_self_id) if (entry.th == NULL) { /* unused */ list_del(&entry.node); } - - rb_native_cond_destroy(&entry.cond); } rb_native_mutex_unlock(&thread_cache_lock); + rb_native_cond_destroy(&entry.cond); + return entry.th; } #else |