Closed Bug 1613878 Opened 4 years ago Closed 4 years ago

Initialize XPCOM thread pool helper when running js shell

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED INVALID

People

(Reporter: allstars.chh, Assigned: allstars.chh)

References

Details

In Bug 1539270 we initialize the XPCOM thread pool and set the HelperThreadTaskCallback in XPCJSRuntime, however js shell doesn't initialize XPCJSRuntime, so we need to do the same initialization for js shell.

I am wondering should we move the thread pool helper code from XPCJSRuntime.cpp into jsapi.[cpp.h] or js/src/vm/Runtime.[cpp|h] ?

Using the XPCOM thread pool in the JS shell is not really feasible because AFAIK that requires a lot of XPCOM machinery.

I think in the end SpiderMonkey should use the thread pool interface, but it would also have its own simple thread pool for when the embedder doesn't want to override it. It would be similar to what's in HelperThreads.cpp but use the same abstraction as the external thread pool.

Jan's comment makes sense, I'll close this as INVALID

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.