Windows-only processor-count query.
getHardwareConcurrency
(-- count) Queries GetSystemInfo and returns dwNumberOfProcessors cast to an unknown Int32 value.- Windows: each call performs a fresh
GetSystemInfoquery.
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
- windows/kernel32: Kernel32 declarations for synchronization, process, thread, file, and timing helpers.
- windows/Thread: Windows thread wrapper and helper constructor.
- sync/sync: Cross-platform scheduling, sleep, time, IPv4 formatting, and TCP helpers.