e.g. https://chromium-coverage.appspot.com/reports/560344/linux/chromium/src/base/task_scheduler/scheduler_worker.cc.html
150 22.6k if (static_cast<int>(priority_hint_) <
151 22.6k static_cast<int>(ThreadPriority::NORMAL) &&
152 22.6k (task_tracker_->HasShutdownStarted() ||
153 0 !PlatformThread::CanIncreaseCurrentThreadPriority())) {
154 0 return ThreadPriority::NORMAL;
155 0 }
We have a test that exercises exactly this : TaskSchedulerWorkerTest.BumpPriorityOfAliveThreadDuringShutdown
but it's only truly exercising the above bits on Windows because the pools are not using ThreadPriority::BACKGROUND priority on POSIX (for other reasons).
Comment 1 by infe...@chromium.org
, May 22 2018Status: Duplicate (was: Untriaged)