Add a method for mozilla::Task to know if it can be executed next.
Categories
(Core :: XPCOM, enhancement, P3)
Tracking
()
People
(Reporter: allstars.chh, Assigned: allstars.chh)
References
Details
Attachments
(1 obsolete file)
For the off-thread tasks in Spidermonkey, most of them have a limit for maximum parallel executions.
https://searchfox.org/mozilla-central/rev/fa48ebee58d59fa846919c3e2c3122b08db57c9c/js/src/vm/HelperThreads.cpp#1510
When dispatching these tasks to TaskController, it would be quite helpful if TaskController can check the method added in mozilla::Task before executing it.
https://searchfox.org/mozilla-central/rev/fa48ebee58d59fa846919c3e2c3122b08db57c9c/xpcom/threads/TaskController.cpp#245
Assignee | ||
Comment 1•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Found out I could return false in Task::Run to tell TaskController to re-run this task again.
https://searchfox.org/mozilla-central/rev/b6f52976b562008c9d9ceeda22907e1eda506c8e/xpcom/threads/TaskController.h#194
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Comment 4•4 years ago
|
||
The current plan doesn't require this. We will only dispatch a task to the thread pool if there is a task that can run under the current system of limits.
Description
•