automaxprocs – go.uber.org/automaxprocs Index | Examples | Files | Directories

package automaxprocs

import "go.uber.org/automaxprocs"

Package automaxprocs automatically sets GOMAXPROCS to match the Linux container CPU quota, if any.

Example

Code:play 

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() {}

Index

Examples

Source Files

automaxprocs.go

Directories

PathSynopsis
internal
maxprocsPackage maxprocs lets Go programs easily configure runtime.GOMAXPROCS to match the configured Linux CPU quota.
Version
v1.2.0
Published
Feb 23, 2018
Platform
darwin/amd64
Imports
2 packages
Last checked
now

Tools for package owners.