Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: fix for CPU detection #72

Merged
merged 1 commit into from
Oct 25, 2017
Merged

server: fix for CPU detection #72

merged 1 commit into from
Oct 25, 2017

Conversation

missinglink
Copy link
Member

@missinglink missinglink commented Oct 25, 2017

PR #64 introduced a bug where failing to specify the CPUS environment variable started the server in single-threaded mode:

$ node server/http.js 
cpus NaN

This PR fixes the bug so the default behaviour is now to start the server using all available CPUs:

$ node server/http.js 
cpus 8

CPUS=-1 node server/http.js 
cpus 1

CPUS=0 node server/http.js 
cpus 8

CPUS=2 node server/http.js 
cpus 2

CPUS=999 node server/http.js 
cpus 8

CPUS= node server/http.js 
cpus 8

CPUS=test node server/http.js 
cpus 8

@ghost ghost assigned missinglink Oct 25, 2017
@ghost ghost added the in review label Oct 25, 2017
@missinglink missinglink merged commit 007ffdd into master Oct 25, 2017
@ghost ghost removed the in review label Oct 25, 2017
@orangejulius
Copy link
Member

Can I get a machine with Infinity cores too please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants