Sign in Join
FPDoc Onlineexperiment

GetSystemThreadCount function

In unit UTF8Process

Gets the number of threads available on the system.

Declaration

pascal
function GetSystemThreadCount: Integer

Function result

The number of threads on the system.

Description

GetSystemThreadCount is an Integer function used to get the number of threads on the system. The implementation for GetSystemThreadCount is platform- and/or OS-specific. For the Windows environment, the total number of processors available (including logical hyperthreaded processors) are returned using the GetProcessAffinityMask API. When GetProcessAffinityMask is unavailable, the total number of processors from GetSystemInfo is used. For UNIX-like environments, either the sysconf or the fpsysctl function is used. For other environments, the return value is always 1.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.