Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Commit

Permalink
fix: don't use a worker farm unless more than one process is required (
Browse files Browse the repository at this point in the history
  • Loading branch information
hedgepigdaniel authored and evilebottnawi committed May 15, 2018
1 parent dbebb3b commit 3f0767b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/uglify/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class {
return;
}

if (this.maxConcurrentWorkers > 0) {
if (this.maxConcurrentWorkers > 1) {
const workerOptions = process.platform === 'win32' ? { maxConcurrentWorkers: this.maxConcurrentWorkers, maxConcurrentCallsPerWorker: 1 } : { maxConcurrentWorkers: this.maxConcurrentWorkers };
this.workers = workerFarm(workerOptions, workerFile);
this.boundWorkers = (options, cb) => this.workers(serialize(options), cb);
Expand Down

0 comments on commit 3f0767b

Please sign in to comment.