Windows-only processor-count query.


getHardwareConcurrency

(-- count) Queries GetSystemInfo and returns dwNumberOfProcessors cast to an unknown Int32 value.
  • Windows: each call performs a fresh GetSystemInfo query.

Examples

Windows processor-count example

"String"                      use
"control"                     use
"windows/hardwareConcurrency" use

{} Int32 {} [
  count: getHardwareConcurrency;
  ("positive=" count 0 > LF) printList
  0
] "main" exportFunction

Expected Output

positive=TRUE

See also