Issue #7505 has been reported by kosaki (Motohiro KOSAKI).

----------------------------------------
Feature #7505: Mutex#owned? ???????????設
https://bugs.ruby-lang.org/issues/7505

Author: kosaki (Motohiro KOSAKI)
Status: Open
Priority: Normal
Assignee: 
Category: core
Target version: next minor


以????????????????????????????????????????

Thread.async_interrupt_timing(Object => :on_blocking) {
  begin
??????mutex = Mutex.new
    mutex.synchronize {
       sleep 1
       condvar.wait mutex
  ???}
  ensure
    ?????解??????????
  end
}

mutex.synchronize??中???Ctrl-c?????????????????????込?????????????????????????????????????

1) sleep
2) mutex.sleep?????中???native_sleep?condvar.signal ?????
3) mutex.sleep?????中???rb_mutex_lock(condvar.signal??起????????????????mutex???????????????使?中?????????????mutex?????

???????????????????mutex??????????????ensure???????????????????mutex???????????????ensure????????????????????????????????????????Ruby????????????????????????????????????????ruby???????? workaround????????????????????????????????????

???????正?????????????段????????????????????????????????????Mutex#owned? ???????????設??????????????????????????Mutex#locked? ?????????????????????????????????????????true???????????

???????????轡?

https://gist.github.com/4195632

以???????POSIX???????pthread_cond_wait????????????????????????????????????????????????Mutex???lock???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Ctrl-C??????????????????akr????????好?????????????????????




-- 
http://bugs.ruby-lang.org/