runtimex

package
v0.0.0-...-fb8c843 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package runtimex fixes the following API in standard runtime package. - NumCPU()

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NumCPU

func NumCPU() int

NumCPU returns the number of logical CPUs usable by the current process. On Windows, runtime.NumCPU() only returns the information for a single Processor Group (up to 64). runtimex.NumCPU() uses GetActiveProcessorCount to get cpu counts from all Processor Groups. See the solution in kubernetes. https://github.com/kubernetes/kubernetes/blob/a4b8a3b2e33a3b591884f69b64f439e6b880dc40/pkg/kubelet/winstats/perfcounter_nodestats_windows.go#L205 On non-Windows, runtime.NumCPU() is used as is.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL