1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/library
normal 647fc1227a 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
2018-08-18 06:33:49 +00:00
..
abbrev
base64
bigdecimal Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
bigmath
cgi
complex
conditionvariable thread_sync.c (rb_mutex_synchronize): only unlock if we own the mutex 2018-08-18 06:33:49 +00:00
coverage
csv
date Update to ruby/spec@9be7c7e 2018-08-03 16:19:40 +00:00
datetime
delegate
digest Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
drb
English
erb Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
etc
expect
fiber
find
getoptlong
ipaddr Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
logger
mathn
matrix
net Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
observer
open3
openssl
openstruct
optionparser
pathname Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
pp
prime
rbconfig Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
readline
resolv
rexml Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
scanf
securerandom
set Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
shellwords
singleton
socket Guard spec failing on Solaris 2018-08-17 23:51:47 +00:00
stringio Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
stringscanner Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
syslog
tempfile Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
thread
time
timeout
tmpdir/dir
uri Update to ruby/spec@a454137 2018-06-27 12:30:05 +00:00
weakref Update to ruby/spec@9be7c7e 2018-08-03 16:19:40 +00:00
win32ole
yaml
zlib Update to ruby/spec@9be7c7e 2018-08-03 16:19:40 +00:00