Sign in Join
FPDoc Onlineexperiment

TThread.ProcessorCount property

Member of TThreadpublicIn unit Classes

Return the processor count for this system.

Declaration

pascal
property ProcessorCount: LongWord read FProcessorCount;

Description

ProcessorCount returns the processor count for this system.

Whether this is the number of cores or the number of CPUs present in the hardware, is deliberately unspecified. The number of cores can also vary during the lifetime of the program, and the FPC implementation does not guarantee that this will always match, the value is set at program start.

As such, the number specified should only be used as an indication of how many threads can be executed at once by the system.

See also

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