automaxprocsgo.uber.org/automaxprocs/internal/runtime Index | Files

package runtime

import "go.uber.org/automaxprocs/internal/runtime"

Index

Constants

const MinGOMAXPROCS = 2

MinGOMAXPROCS defines the minimum value for GOMAXPROCS

Types

type CPUQuotaStatus

type CPUQuotaStatus int

CPUQuotaStatus presents the status of how CPU quota is used

const (
	// CPUQuotaUndefined is returned when CPU quota is undefined
	CPUQuotaUndefined CPUQuotaStatus = iota
	// CPUQuotaUsed is returned when a valid CPU quota can be used
	CPUQuotaUsed
	// CPUQuotaMinUsed is return when CPU quota is larger than the min value
	CPUQuotaMinUsed
)

func CPUQuotaToGOMAXPROCS

func CPUQuotaToGOMAXPROCS(_ int) (int, CPUQuotaStatus, error)

CPUQuotaToGOMAXPROCS converts the CPU quota applied to the calling process to a valid GOMAXPROCS value. This is Linux-specific and not supported in the current OS.

Source Files

cpu_quota_unsupported.go runtime.go

Version
v1.0.0
Published
Aug 10, 2017
Platform
windows/amd64
Last checked
14 hours ago

Tools for package owners.