Closed Bug 1840313 Opened 2 years ago Closed 2 years ago

return full TaskQueue class from CreateBackgroundTaskQueue()

Categories

(Core :: XPCOM, task)

All
Unspecified
task

Tracking

()

RESOLVED FIXED
116 Branch
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.

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

Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1c38028d7b56 remove declaration of non-existent TaskQueue::CancelDelayedRunnables() r=emilio https://hg.mozilla.org/integration/autoland/rev/3533bb47987a return full TaskQueue class from CreateBackgroundTaskQueue() r=xpcom-reviewers,nika https://hg.mozilla.org/integration/autoland/rev/e53bf8e2b62a fetch and remove the first element of queue in one operation r=emilio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: