Make processFilesForTarget methods async in caching-compiler.

This ensures that the entire compilation batch runs in its own Fiber,
since each async function invocation recycles a Fiber from the pool.
This commit is contained in:
Ben Newman
2018-06-29 18:15:31 -04:00
parent 2558f623b0
commit 0097cd1f2b
2 changed files with 2 additions and 2 deletions

View File

@@ -277,7 +277,7 @@ CachingCompiler = class CachingCompiler extends CachingCompilerBase {
// you have processing you want to perform at the beginning or end of a
// processing phase, you may want to override this method and call the
// superclass implementation from within your method.
processFilesForTarget(inputFiles) {
async processFilesForTarget(inputFiles) {
const cacheMisses = [];
const arches = this._cacheDebugEnabled && Object.create(null);

View File

@@ -78,7 +78,7 @@ extends CachingCompilerBase {
}
// The processFilesForTarget method from the Plugin.registerCompiler API.
processFilesForTarget(inputFiles) {
async processFilesForTarget(inputFiles) {
const allFiles = new Map;
const cacheKeyMap = new Map;
const cacheMisses = [];