-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Set GOMAXPROCS. #2112
Conversation
@@ -45,6 +45,9 @@ func main() { | |||
commit = "unknown" | |||
} | |||
|
|||
// Set parallelism. | |||
runtime.GOMAXPROCS(runtime.NumCPU()) |
There was a problem hiding this comment.
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))
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. :-)
+1 on CHANGELOG update (and green build). |
❤️ |
docs(http): remove unused org param from swagger
Overview
This pull request simply sets
GOMAXPROCS
based on the number of available CPUs.