js::RunnableTasks should know their thread type
Categories
(Core :: JavaScript Engine, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: KrisWright, Assigned: KrisWright)
References
Details
Attachments
(1 file, 1 obsolete file)
Spidermonkey helper threads identify their thread type in their TaskSpecs[1], meaning it doesn't matter to Spidermonkey if a RunnableTask knows its own type or not. I noticed that XPCOM thread pools, which will not know what kind of RunnableTask it's accepting, will need some way to identify these types for prioritization and to avoid a shutdown race. If RunnableTask knows its own thread type then XPCOM will have access to that data - it can use the existing js::ThreadType[2] similarly to how TaskSpecs uses it to identify threads.
[1] https://searchfox.org/mozilla-central/rev/9eb2f739c165b4e294929f7b99fbb4d90f8a396b/js/src/vm/HelperThreads.cpp#2447
[2] https://searchfox.org/mozilla-central/rev/9eb2f739c165b4e294929f7b99fbb4d90f8a396b/js/public/Utility.h#64
Assignee | ||
Comment 1•5 years ago
|
||
Added thread type as ThreadType enum. Default is ThreadType::THREAD_TYPE_NONE. RunnableTasks must specify their own thread type.
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Added thread type as ThreadType enum. RunnableTasks must specify their own thread type.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Please ask for a review before we land this bug.
Removing checkin-needed for now.
Assignee | ||
Comment 4•5 years ago
|
||
(In reply to Dorel Luca [:dluca] from comment #3)
Please ask for a review before we land this bug.
Removing checkin-needed for now.
The patch was reviewed by jonco above. For some reason phabricator did not link them even though it's the same patch. Is there some way in phab to carry over the accept? It's the same patch with the requested change made.
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Pushed by nbeleuzu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b26753fb35e7
Adding ThreadType to js::RunnableTask r=jonco
Comment 6•5 years ago
|
||
bugherder |
Description
•