Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow up to #14554 where a comment by @yxhuvud made me realize that
Thread#start
wasn't exactly GC safe, in that a GC collection could happen in parallel to a thread starting and it could free the Thread object before the thread is started or before the thread is properly shutdown.The patch mostly moves the calls to add/remove the thread object from the linked list, along with some explanations.
Note: only the last commit is relevant, the rest is from #14554.