-
Francois Doray authored
The previous attempt to land this CL was reverted because an early call to PlatformThread::SetCurrentThreadPriority() in headless caused the FeatureList to be accessed before it was initialized. This CL avoids accessing an uninitialized FeatureList if the target priority is not BACKGROUND. Diff between ps 1 and 5 shows changes made since revert. Previous attempts to land: https://chromium-review.googlesource.com/1171482 https://chromium-review.googlesource.com/1185529 https://chromium-review.googlesource.com/1190842 NOTE: If this causes new test failures, we'll add the value returned by GetThreadPriority() to the switch/case of allowed values. This CL adds a feature to use THREAD_MODE_BACKGROUND_BEGIN instead of THREAD_PRIORITY_LOWEST for ThreadPriority::BACKGROUND threads. This lowers the disk and network I/O priority of the thread in addition to the CPU scheduling priority. MSDN recommends using this setting for threads that perform background work. https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-setthreadpriority Bug: 872820 Change-Id: I2c9f17390eaaba2f8f454faa29836bbc37e3d47c Reviewed-on: https://chromium-review.googlesource.com/1195677 Commit-Queue: François Doray <fdoray@chromium.org> Reviewed-by:
Gabriel Charette <gab@chromium.org> Cr-Commit-Position: refs/heads/master@{#587349}
8a783b30