Skip to content

Commit

Permalink
disable concurrency in case of libuv/libuv#1459
Browse files Browse the repository at this point in the history
  • Loading branch information
Quasic authored and rvagg committed Nov 16, 2017
1 parent be6dd2e commit 0b2349c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/farm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const DEFAULT_OPTIONS = {
maxCallsPerWorker : Infinity
, maxConcurrentWorkers : require('os').cpus().length
, maxConcurrentWorkers : (require('os').cpus() || { length: 1 }).length

This comment has been minimized.

Copy link
@trusktr

trusktr Jan 11, 2018

My Android phone has 8 cores. Is there a better fix so that I don't just use 1 core?

This comment has been minimized.

Copy link
@Kikobeats

Kikobeats Jan 11, 2018

Contributor

related #65

This comment has been minimized.

Copy link
@mistertown

mistertown Feb 26, 2018

@trusktr you can manually edit maxConcurrentWorkers to whatever number you like in /usr/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js. Courtesy of this thread.

Details on Termux file system access are here, but cd $PREFIX/lib/node_modules/npm/node_modules/worker-farm/lib/ should get you there.

, maxConcurrentCallsPerWorker : 10
, maxConcurrentCalls : Infinity
, maxCallTime : Infinity // exceed this and the whole worker is terminated
Expand Down

3 comments on commit 0b2349c

@ivitan
Copy link

@ivitan ivitan commented on 0b2349c Jul 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cant not run npm i -g npm on Termux

@bozeyman9000
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would enabling extra cores help? Im confused. Is it the amount of bits that the command requires?

@Tymski
Copy link

@Tymski Tymski commented on 0b2349c Dec 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't help for me

Please sign in to comment.