Skip to content
Snippets Groups Projects
Commit 3a94fcbb authored by Douglas Wilson's avatar Douglas Wilson
Browse files

[rts] [gc] kill any_work, add mutex + condition variable

Here we remove the schedYield loop in scavenge_until_all_done+any_work, replacing
it with a single mutex + condition variable.

Previously any_work would check todo_large_objects, todo_q,
todo_overflow of each gen for work. Comments explained that this was
checking global work in any gen. However, these must have been out of
date, because all of these locations are local to a gc thread.

We've eliminated any_work entirely, instead simply looping back into
scavenge_loop, which will quickly return if there is no work.

shutdown_gc_threads is called slightly earlier than before. This ensures
that n_gc_threads can never be observed to increase from 0 by a worker thread.
parent ee39de62
No related branches found
No related tags found
No related merge requests found
Pipeline #28791 passed with warnings
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment