Closed Bug 1539270 Opened 8 months ago Closed 5 months ago

Have XPConnect instantiate a JS Helperthread pool using XPCOM threadpools

Categories

(Core :: XPConnect, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: KrisWright, Assigned: KrisWright)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

Attachments

(2 files)

In order to bring HelperThreads over into the XPCOM thread pools, we need to instantiate an nsThreadPool instance in xpconnect to dispatch tasks to. It needs to take a common task type from JS (see Bug 1532803) managed by some subclass of mozilla::Runnable that can define its own run() method for dispatch.

Depends on: 1541170

Added HelperThreadPool & HelperThreadTaskHandler classes to hold and manage an nsThreadPool. Initialized thread pool in XPCJSRuntime and created the HelperThreads() method to access directly.

Created a hook in Runtime to expose the helper thread dispatch method to js, which is set by XPCJSRUntime::init.

Assignee: nobody → kwright
Priority: -- → P2
Blocks: 1559659
Blocks: 1559660
Pushed by kwright@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/84bba101c4f4
Part 1: Add HelperThreadPool & HelperThreadTaskHandler classes and their initialization/shutdown process to manage an nsThreadPool r=mccr8,froydnj
https://hg.mozilla.org/integration/autoland/rev/abacb77a97bb
Part 2: Runtime hook to expose the helper thread dispatch method to js r=sfink
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.