Sign in Join
FPDoc Onlineexperiment

TLazMonitor.SpinCount property

Member of TLazMonitorpublicIn unit LazCollections

Number of busy waiting iterations used in the monitor.

Declaration

pascal
property SpinCount: Integer read GetSpinCount write SetSpinCount;

Description

SpinCount is an Integer property which indicates the number of busy waiting iterations used in the monitor. The default value for the property is set in the Create constructor to the value in the DefaultSpinCount class property.

Set the value in SpinCount to increase or decrease the number of spinlock iterations performed in the Acquire method. The value should be kept as small as possible to avoid the overhead of process scheduler/context switching conflicts for executing threads.

See also

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