summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-07-28 19:55:55 +1200
committernagachika <nagachika@ruby-lang.org>2021-09-26 20:49:54 +0900
commit8ac058b64577d9b6fb1ee998d0fa7800529d7d34 (patch)
tree840566542980745ab96d859b503671ea368062e1 /include
parent7d4a0c4b93cbdf40a9a43c4974199405099a8545 (diff)
Fix potential hang when joining threads.
If the thread termination invokes user code after `th->status` becomes `THREAD_KILLED`, and the user unblock function causes that `th->status` to become something else (e.g. `THREAD_RUNNING`), threads waiting in `thread_join_sleep` will hang forever. We move the unblock function call to before the thread status is updated, and allow threads to join as soon as `th->value` becomes defined. This reverts commit 6505c77501f1924571b2fe620c5c7b31ede0cd22.
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions