Initialize XPCOM thread pool helper when running js shell
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
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] ?
Comment 1•4 years ago
|
||
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.
Assignee | ||
Comment 2•4 years ago
|
||
Jan's comment makes sense, I'll close this as INVALID
Description
•