New issue
Advanced search Search tips

Issue 839099 link

Starred by 4 users

Issue metadata

Status: Duplicate
Merged: issue 889029
Owner:
Closed: Oct 15
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature

Blocked on:
issue 839122

Blocking:
issue 747495



Sign in to add a comment

[Feature] Add ability to modify traits of a TaskScheduler sequence after it was created

Project Member Reported by gab@chromium.org, May 2 2018

Issue description

Tentative proposal:

Change return type of base::CreateFooTaskRunnerWithTraits() from FooTaskRunner to AdjustableFooTaskRunner.

An AdjustableFooTaskRunner is-a FooTaskRunner and can be passed as such to components that shouldn't be able to toggle the sequence's traits.

By default though the owner of the original task runner may toggle its TaskTraits at run-time if it holds on to the AdjustableFooTaskRunner interface.

Use cases:
 * Windows module enumeration : BACKGROUND set of tasks that may become USER_BLOCKING if the user opens a special chrome:// URL

 * Read on startup, forever after periodically flush to disk : read is USER_BLOCKING/CONTINUE_ON_SHUTDOWN, write is BACKGROUND/BLOCK_ON_SHUTDOWN.
  Currently the whole sequence must remain USER_BLOCKING priority for all writes after startup, this is unnecessary and can cause random flushes to race with the cache on page load.
  Not being to use CONTINUE_ON_SHUTDOWN on startup has resulted in shutdown hangs when shutting down before startup is complete (e.g. issue 477409).
 

Comment 1 by gab@chromium.org, May 2 2018

Blockedon: 839122

Comment 2 by gab@chromium.org, May 3 2018

Blocking: 747495

Comment 3 by gab@chromium.org, May 3 2018

 Issue 747495  has been merged into this issue.

Comment 4 by gab@chromium.org, May 9 2018

Labels: -Pri-3 M-69 Pri-2
Owner: chrisha@chromium.org
Status: Assigned (was: Available)
@chrisha: interested in doing this to dip your toes in TaskScheduler land? This will help your third_party modules use case I believe so win-win :)
Mergedinto: 889029
Status: Duplicate (was: Assigned)

Sign in to add a comment