Closed Bug 1704534 Opened 3 years ago Closed 3 years ago

Add a method for mozilla::Task to know if it can be executed next.

Categories

(Core :: XPCOM, enhancement, P3)

enhancement

Tracking

()

RESOLVED WONTFIX

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: nobody → allstars.chh
Status: NEW → ASSIGNED

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

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
Attachment #9215615 - Attachment is obsolete: true
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---

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.

Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: