summaryrefslogtreecommitdiff
path: root/defs
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-07-19 19:21:46 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-07-27 18:23:30 +1200
commit13f8521c630a15c87398dee0763e95f59c032a94 (patch)
treeadfa523406b6468a457c68ef6ffde37c7319fa97 /defs
parentcd49940cff39601ff573add7cbcc8e80a54ad5f2 (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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4660
Diffstat (limited to 'defs')
0 files changed, 0 insertions, 0 deletions