summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-13 21:34:24 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-13 21:34:24 +0000
commit3dd6288d7375ddb2a84cdec4192a6f71c7461b28 (patch)
tree6b84a5ae6258330ce16d972047783c81fe42dc97 /include
parent48b6bd74e2febde095ac85d818e94c0e58677647 (diff)
thread_pthread: use POSIX timer or thread to get rid of races
This closes race condition where GVL is uncontended and a thread receives a signal immediately before calling the blocking function when releasing GVL: 1) check interrupts 2) release GVL 3) blocking function If signal fires after 1) but before 3), that thread may never wake up if GVL is uncontended We also need to wakeup the ubf_list unconditionally on gvl_yield; because two threads can be yielding to each other while waiting on IO#close while waiting on threads in IO#read or IO#gets. [ruby-core:88360] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions