[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
Pipeline #28791 passed with warnings
Stage: tool-lint
Stage: quick-build
Stage: lint
Stage: build
Stage: full-build
Stage: packaging
Stage: testing
Loading
Please register or sign in to comment