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

Commit

Permalink
fix(index): make maxConcurrentCallsPerWorker limit windows only
Browse files Browse the repository at this point in the history
  • Loading branch information
brentwilton committed Nov 22, 2017
1 parent d76a04d commit 80d3706
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/uglify/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ export default class {
}

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

0 comments on commit 80d3706

Please sign in to comment.