TThread.ProcessorCount

Return the processor count for this system

Declaration

Source position: classesh.inc line 1982

public Property
  ProcessorCount : LongWord;

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

Name Description
LongWord An unsigned 32-bits integer
TThread.IsSingleProcessor Is the current system single processor or not