Currently base/task_scheduler/post_task.h requires a TaskScheduler to be set for any of the APIs to work.
This has been a source of issues (crashes) for Chrome initialization as we find callers that occur before a TaskScheduler is actually set. To solve this issue once and for all, a default TaskScheduler should probably be set for later customization.
There are two main approaches considered:
1) A simple task scheduler without all of the bells and whistles of the main one.
2) A queuing task scheduler that will wait until the real one is instantiated and forward to that.
Both approaches will require a handoff of the in-flight tasks to the next task scheduler.
Currently base/task_scheduler/post_task.h requires a TaskScheduler to be set for any of the APIs to work.
This has been a source of issues (crashes) for Chrome initialization as we find callers that occur before a TaskScheduler is actually set. To solve this issue once and for all, a default TaskScheduler should probably be set for later customization.
There are two main approaches considered:
1) A simple task scheduler without all of the bells and whistles of the main one.
2) A queuing task scheduler that will wait until the real one is instantiated and forward to that.
3) Allowing the current default task scheduler to queue and then adjust to environment parameters specified after construction.
Options (1) and (2) will require a handoff of the in-flight tasks to the next task scheduler.
Option (3) will require adjusting the machinery to allow for parameter changes like maximum number of workers (currently we have an assumption that this doesn't change after construction).
Comment 1 by robliao@chromium.org
, Feb 14 2017