// Transition from mark 1 to mark 2.
//
// The global work list is empty, but there can still be work
- // sitting in the per-P work caches and there can be more
- // objects reachable from global roots since they don't have write
- // barriers. Rescan some roots and flush work caches.
+ // sitting in the per-P work caches.
+ // Flush and disable work caches.
gcMarkRootCheck()
// ensure all Ps see gcBlackenPromptly. This
// also blocks until any remaining mark 1
// workers have exited their loop so we can
- // start new mark 2 workers that will observe
- // the new root marking jobs.
+ // start new mark 2 workers.
forEachP(func(_p_ *p) {
_p_.gcw.dispose()
})