Closed Bug 1625286 Opened 4 months ago Closed 4 months ago

Expose dispatch flags to `moz_task`

Categories

(Core :: XPCOM, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: lina, Assigned: lina)

References

Details

Attachments

(1 file)

In particular, we want to expose DISPATCH_EVENT_MAY_BLOCK, so we can schedule bridged Sync engine tasks (which are going to be I/O bound) on the dedicated mIOPool.

This commit adds a dispatch_with_options method to Rust task
runnables, which takes a builder-style DispatchOptions
argument controlling how the runnable should be dispatched.
Currently, the only supported option is may_block, which
corresponds to nsIEventTarget::DISPATCH_EVENT_MAY_BLOCK.

Pushed by kcambridge@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b397f3ab8dc3
Expose dispatch flags to `moz_task`. r=KrisWright
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.