Currently, the priority a task is posted with cannot be changed. As a result, tasks that are not needed immediately but may be at some future point are often posted at high priority to ensure that they are not stuck waiting in the queue if they are requested.
If task priorities were updateable after posting, a task that may or may not be immediately needed by the user could be posted with TaskPriority::BEST_EFFORT, then upgraded to TaskPriority::USER_BLOCKING if still in the TaskScheduler queue when needed immediately by the user. This would hasten execution of tasks that are truly user-blocking by de-prioritizing ‘just-in-case’ tasks.
Comment 1 by bugdroid1@chromium.org
, Oct 5