diff options
author | Benjamin Elder <bentheelder@google.com> | 2023-05-18 10:32:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-18 19:32:49 +0200 |
commit | 008170c8a9b90e8e5d403ca18d30e8c35ed4f961 (patch) | |
tree | cb74b6f9aa99af860c78a4ca5eb8d01fc317d094 /commands | |
parent | 7c647bcaeba7a08955eb3a66a42cf673404731df (diff) |
Make GOMAXPROCS to be CPU limit aware
Fixes #10950
Diffstat (limited to 'commands')
-rw-r--r-- | commands/commandeer.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/commands/commandeer.go b/commands/commandeer.go index 8e768f045..465516e2e 100644 --- a/commands/commandeer.go +++ b/commands/commandeer.go @@ -28,6 +28,8 @@ import ( jww "github.com/spf13/jwalterweatherman" + "go.uber.org/automaxprocs/maxprocs" + "github.com/bep/clock" "github.com/bep/lazycache" "github.com/bep/overlayfs" @@ -53,6 +55,8 @@ var ( // Execute executes a command. func Execute(args []string) error { + // Default GOMAXPROCS to be CPU limit aware, still respecting GOMAXPROCS env. + maxprocs.Set() x, err := newExec() if err != nil { return err |