Skip to content

can golang get cpu counts like c language by using sysconf (_SC_NPROCESSORS_CONF) ? #75823

@ningmingxiao

Description

@ningmingxiao

if total cpu is 8 and set cpu affinity 0-2 runtime.NumCPU() is 3 can't get total cpu 8.
I don't want to use cgo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionIssues that are questions about using Go.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions