Closed Bug 1650393 Opened 4 years ago Closed 4 years ago

Add a base class with runTaskLocked method

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

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

Details

Attachments

(1 file)

In Bug 1649887 I added runTaskLocked methods in some tasks, we could make it a base class.

Attachment #9161535 - Attachment description: Bug 1650393 - Add a base class RunnableTaskLocked. → Bug 1650393 - Add a base class HelperThreadTask.

Jonco, can you clarify if those tasks don't need to inherit RunnableTask per your comment
https://phabricator.services.mozilla.com/D82322#2522795

then what's your plan to execute those tasks when we dispatch them to XPCOM thread pool?
https://searchfox.org/mozilla-central/rev/91d82d7cbf05a71954dfa49d0e43824c7c973e62/js/xpconnect/src/XPCJSThreadPool.h#33

Flags: needinfo?(jcoppeard)

(In reply to Yoshi Cheng-Hao Huang [:allstars.chh][:allstarschh] from comment #2)
We can't get the XPCOM thread pool to execute these tasks directly by calling their runTask() method because we need to do some work after each task (e.g. dispatch the next task). We'll need to have a separate object to do this (which would inherit RunnableTask).

Flags: needinfo?(jcoppeard)
Pushed by allstars.chh@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c4ee6735f5a8
Add a base class HelperThreadTask. r=jonco
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: