[Overview][Types][Classes][Index] Reference for unit 'LazCollections' (#lazutils)

TLazMonitor.SpinCount

Number of busy waiting iterations used in the monitor.

Declaration

Source position: lazcollections.pas line 53

public property TLazMonitor.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

TLazMonitor.Create

  

Constructor for the class instance.

TLazMonitor.DefaultSpinCount

  

Default number of busy waiting iterations used in instances of the class.

TLazMonitor.Acquire

  

Limits thread access to the calling thread.


Version 4.0 Generated 2025-05-03 Home