Documentation ¶
Overview ¶
Package automaxprocs automatically sets GOMAXPROCS to match the Linux container CPU quota, if any.
Example ¶
package main // Importing automaxprocs automatically adjusts GOMAXPROCS. import _ "go.uber.org/automaxprocs" // To render a whole-file example, we need a package-level declaration. var _ = "" func main() {}
Output:
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
cgroups
Package cgroups provides utilities to access Linux control group (CGroups) parameters (CPU quota, for example) for a given process.
|
Package cgroups provides utilities to access Linux control group (CGroups) parameters (CPU quota, for example) for a given process. |
Package maxprocs lets Go programs easily configure runtime.GOMAXPROCS to match the configured Linux CPU quota.
|
Package maxprocs lets Go programs easily configure runtime.GOMAXPROCS to match the configured Linux CPU quota. |
Click to show internal directories.
Click to hide internal directories.