summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authorSamuel Williams <[email protected]>2021-07-19 19:21:46 +1200
committerSamuel Williams <[email protected]>2021-07-27 18:23:30 +1200
commit13f8521c630a15c87398dee0763e95f59c032a94 (patch)
treeadfa523406b6468a457c68ef6ffde37c7319fa97 /variable.c
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 'variable.c')
0 files changed, 0 insertions, 0 deletions