# cpuinfo

Dark Mode

- Manual
- Standard library
- Index
- devel, stable

Search:
Group by:

This module implements procs to determine the number of CPUs / cores.

Examples:

    block:
      doAssert countProcessors() > 0

# Imports

posix

# Procs

    proc countProcessors(): int {...}{.gcsafe, extern: "ncpi$1", raises: [], tags: [].}

  returns the number of the processors/cores the machine has. Returns 0 if it cannot be detected. Source Edit