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:
parent
7a8460ed5a
commit
bff57efca1
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue