Open
Bug 1507653
Opened 3 years ago
Updated 1 year ago
Extend PromiseWorker to support asynchronously executing workers
Categories
(Toolkit :: General, enhancement, P3)
Toolkit
General
Tracking
()
NEW
People
(Reporter: dthayer, Assigned: dthayer)
References
Details
Attachments
(1 file)
If we want to do asynchronous work inside of a worker right now, we can't use a PromiseWorker. The worker/PromiseWorker.js code expects the dispatch(...) function to immediately return a value, and BasePromiseWorker implements the request ids as simply a debug check on its queue-based message processing. We should use a Map of id's to handlers instead of a queue, and allow returning a promise inside the worker code itself.
| Assignee | ||
Comment 2•3 years ago
|
||
Right now PromiseWorker supports an async interface on the consumer side, but the worker code itself can't be async. This can be a barrier for bringing certain things (see Bug 1502146 easily into a worker).
Priority: P1 → P3
You need to log in
before you can comment on or make changes to this bug.
Description
•