We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5ce340 commit ff210a0Copy full SHA for ff210a0
main.go
@@ -133,8 +133,9 @@ func printVersion() {
133
134
func main() {
135
mxp := runtime.GOMAXPROCS(0)
136
- if mxp < 4 {
137
- // On a 2-core machine, setting maxprocs to 4 gives 10% better performance
+ if mxp < 4 && os.Getenv("GOMAXPROCS") == "" {
+ // On a 2-core machine, setting maxprocs to 4 gives 10% better performance.
138
+ // But don't override an explicitely set GOMAXPROCS env variable.
139
runtime.GOMAXPROCS(4)
140
}
141
// mount(1) unsets PATH. Since exec.Command does not handle this case, we set
0 commit comments