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

Set GOMAXPROCS. #2112

Merged
merged 3 commits into from
Mar 29, 2015
Merged

Set GOMAXPROCS. #2112

merged 3 commits into from
Mar 29, 2015

Conversation

benbjohnson
Copy link
Contributor

Overview

This pull request simply sets GOMAXPROCS based on the number of available CPUs.

@@ -45,6 +45,9 @@ func main() {
commit = "unknown"
}

// Set parallelism.
runtime.GOMAXPROCS(runtime.NumCPU())
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to suggest we explicitly log this, so the user knows it's happening. E.g.

log.Println("GOMAXPROCS set to", runtime.GOMAXPROCS(0))

Copy link
Member

Choose a reason for hiding this comment

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

good idea. I'm going to do that and merge this.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, cool. Just be sure to add the log line after setting it. :-)

@otoolep
Copy link
Contributor

otoolep commented Mar 29, 2015

+1 on CHANGELOG update (and green build).

pauldix added a commit that referenced this pull request Mar 29, 2015
@pauldix pauldix merged commit 5d905b9 into master Mar 29, 2015
@toddboom
Copy link
Contributor

❤️

@pauldix pauldix deleted the gomaxprocs branch March 29, 2015 23:17
mark-rushakoff pushed a commit that referenced this pull request Jan 9, 2019
docs(http): remove unused org param from swagger
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.

4 participants