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 cache): destroy cond after unlock

No need to hold a lock while destroying a condition variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2018-02-18 23:58:35 +00:00
parent 7a8460ed5a
commit bff57efca1

View file

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