return full TaskQueue class from CreateBackgroundTaskQueue()
Categories
(Core :: XPCOM, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox116 | --- | fixed |
People
(Reporter: karlt, Assigned: karlt)
References
Details
Attachments
(3 files)
TaskQueue methods such as BeginShutdown() and IsEmpty() can be useful to clients.
Only the interface class nsISerialEventTarget was returned over concerns that returning a TaskQueue might imply that clients would need to explicitly shut down the TaskQueue, but this was not correct. TaskQueues do not require explicit shutdown.
| Assignee | ||
Comment 1•2 years ago
|
||
| Assignee | ||
Comment 2•2 years ago
|
||
This makes TaskQueue methods such as BeginShutdown() and IsEmpty() available
to clients.
Only the interface class nsISerialEventTarget was previously returned over
concerns [1] that returning a TaskQueue might imply that clients would need to
explicitly shut down the TaskQueue, but this was not correct. TaskQueues do
not require explicit shutdown [2].
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1584568#c5
[2] https://searchfox.org/mozilla-central/rev/05d1afda588e54be73e31ef4e022dde91f1ed97a/xpcom/threads/TaskQueue.h#49
Depends on D181965
| Assignee | ||
Comment 3•2 years ago
|
||
The two-step logic was left over from a previous std::queue implementation.
https://hg.mozilla.org/mozilla-central/rev/4534179de22c013eb97e8226a538096d7a648721#l2.36
Depends on D181966
Comment 5•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/1c38028d7b56
https://hg.mozilla.org/mozilla-central/rev/3533bb47987a
https://hg.mozilla.org/mozilla-central/rev/e53bf8e2b62a
Description
•