summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-18 06:33:49 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-18 06:33:49 +0000
commit647fc1227a4146ecbfeb0d59358abc8d99cd8ae6 (patch)
treea5c9bd35aaf8ca67b4ff3f27b56726f8a63cca05 /vm_core.h
parent6e0d69e4a72c7a9d9cf5172bd9b74633d7259f9d (diff)
thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex
If an exception is raised inside Mutex#sleep (via ConditionVariable#wait), we cannot guarantee we can own the mutex in the ensure callback. However, who owns the mutex at that point does not matter. What matters is the Mutex is usable after an exception occurs. * thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex * spec/ruby/library/conditionvariable/wait_spec.rb: only test lock usability after thread kill. Who owns the lock at any particular moment is an implementation detail which we cannot easily guarantee. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
0 files changed, 0 insertions, 0 deletions