Split direct task dispatching from AbstractThread
Categories
(Core :: XPCOM, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: jya, Assigned: jya)
References
(Blocks 1 open bug, Regressed 1 open bug)
Details
Attachments
(14 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Currently to be able to use direct tasks, which ar similar to the JS Promise microtasks, we need an AbstractThread and its tail dispatcher.
This is an implementation detail that doesn't have to be.
So the plan is to split direct task dispatching from the tail dispatcher and abstract thread.
We will do so with a new nsIDirectTaskDispatcher task.
nsThread and TaskQueue will then implement it.
Assignee | ||
Comment 1•3 years ago
|
||
For this to be usable with MozPromise (which may require direct task dispatching), we need bug 1637500 to be resolved.
Assignee | ||
Comment 2•3 years ago
|
||
DirectTask dispatching will now be directly handled by nsThread.
Assignee | ||
Comment 3•3 years ago
|
||
DirectTask dispatching will now be directly handled by nsThread.
Depends on D79085
Assignee | ||
Comment 4•3 years ago
|
||
DirectTask dispatching will now be directly handled by nsThread.
Depends on D79086
Assignee | ||
Comment 5•3 years ago
|
||
DirectTask dispatching will now be directly handled by nsThread.
Depends on D79087
Assignee | ||
Comment 6•3 years ago
|
||
DirectTask dispatching will now be directly handled by nsThread.
Depends on D79088
Assignee | ||
Comment 7•3 years ago
|
||
DirectTask dispatching will now be directly handled by nsThread.
Depends on D79089
Assignee | ||
Comment 8•3 years ago
|
||
DirectTask dispatching will now be directly handled by nsThread.
Depends on D79090
Assignee | ||
Comment 9•3 years ago
|
||
We will use it later for implementing direct task dispatching where required.
Depends on D79091
Assignee | ||
Comment 10•3 years ago
|
||
We extract the dealing of direct tasks from the TailDispatcher object and move into to the existing nsThread and TaskQueue classes.
TaskQueue is made to work with do_QueryInterface.
We continue accessing the direct tasks dispatcher via the TailDispatcher for now, which itself will forward the dealing of such tasks to the underlying thread.
Depends on D79092
Assignee | ||
Comment 11•3 years ago
|
||
Depends on D79093
Assignee | ||
Comment 12•3 years ago
|
||
It will simply forward the interface to the main thread.
This is the final step required to remove AbstractThread support here.
Depends on D79094
Assignee | ||
Comment 13•3 years ago
|
||
This prevent being able to assert in the AutoTaskDispatcher that we are using it from the right thread/taskqueue as the SimpleTaskQueue object isn't thread-safe.
We want to assert that all nsIDirectTaskDispatcher methods are only ever accessed on the underlying thread. To do so require that the scope of AutoTaskDispatcher to terminate prior the AutoTaskGuard one.
Depends on D79095
Assignee | ||
Comment 14•3 years ago
|
||
Depends on D79096
Updated•3 years ago
|
Assignee | ||
Comment 15•3 years ago
|
||
Depends on D79095
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 16•3 years ago
|
||
Pushed by jyavenard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/50563df7052a P1. Revert "Bug 1592488 - P11. Ensure an AbstractThread exists for each WorkerThread." r=nika https://hg.mozilla.org/integration/autoland/rev/70208fbe3755 P2. Revert "Bug 1592488 - P9. Make a DOMCacheThread an AbstractThread." r=nika https://hg.mozilla.org/integration/autoland/rev/12725e7040d6 P3. Revert "Bug 1592488 - P8. Ensure AbstractThread exists with STS thread." r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/28097e44c058 P4. Revert "Bug 1592488 - P7. Ensure an AbstractThread exists with RemoteDecoder manager thread." r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/62b9fb746823 P5. Revert "Bug 1592488 - P6. Ensure an AbstractThread exists with RemoteWorkerService thread." r=nika https://hg.mozilla.org/integration/autoland/rev/4dbb4af6a2ab P6. Revert "Bug 1592488 - P5. Ensure an AbstractThread exists with BackgroundThread." r=nika https://hg.mozilla.org/integration/autoland/rev/81a565d1fd64 P7. Revert "Bug 1592488 - P4. Ensure an AbstractThread exists for the Compositor Thread." r=mattwoodrow https://hg.mozilla.org/integration/autoland/rev/f6fc16f49976 P8. Add SimpleTaskQueue object. r=froydnj https://hg.mozilla.org/integration/autoland/rev/faa8e3461f33 P9. Add nsIDirectTaskDispatcher interface. r=froydnj https://hg.mozilla.org/integration/autoland/rev/a0fe9db3ab56 P10. Make MozPromise access direct task dispatcher using QI(nsIDirectTaskDispatcher). r=bholley https://hg.mozilla.org/integration/autoland/rev/b7ed3455ea43 P11. Make DocGroup's LabellingEventTarget implement nsIDirectTaskDispatcher. r=farre https://hg.mozilla.org/integration/autoland/rev/0888e8f9b191 P12. Make STS thread supports nsIDirectTaskDispatcher interface. r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/d985d78962c7 P13. Don't have AutoTaskGuard inherit from AutoTaskDispatcher. r=bholley. https://hg.mozilla.org/integration/autoland/rev/86419b2114e5 P14. Fallback to normal dispatch on release. r=bholley
Comment 18•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/50563df7052a
https://hg.mozilla.org/mozilla-central/rev/70208fbe3755
https://hg.mozilla.org/mozilla-central/rev/12725e7040d6
https://hg.mozilla.org/mozilla-central/rev/28097e44c058
https://hg.mozilla.org/mozilla-central/rev/62b9fb746823
https://hg.mozilla.org/mozilla-central/rev/4dbb4af6a2ab
https://hg.mozilla.org/mozilla-central/rev/81a565d1fd64
https://hg.mozilla.org/mozilla-central/rev/f6fc16f49976
https://hg.mozilla.org/mozilla-central/rev/faa8e3461f33
https://hg.mozilla.org/mozilla-central/rev/a0fe9db3ab56
https://hg.mozilla.org/mozilla-central/rev/b7ed3455ea43
https://hg.mozilla.org/mozilla-central/rev/0888e8f9b191
https://hg.mozilla.org/mozilla-central/rev/d985d78962c7
https://hg.mozilla.org/mozilla-central/rev/86419b2114e5
Description
•