TLazMonitor class
Implements a synchronization construct which provides thread-safe access to resources.
Declaration
TLazMonitor = class(TCriticalSection)Inheritance
- TLazMonitor
- TCriticalSection
- TSynchroObject
- TObject
Description
TLazMonitor is a
TCriticalSection descendant which
implements a synchronization construct that provides thread-safe access to
resources. TLazMonitor extends the ancestor class to use a fixed number of
spinlock (or busy waiting) attempts in its Acquire method. Acquire also
yields CPU cycles to allow other threads to execute when fixed yield and/or
sleep threshold(s) have been reached.
TLazMonitor is used in the implementation of the
TLazThreadedQueue class, and in the
fppkg package.
See also
Properties
SpinCount | public | Number of busy waiting iterations used in the monitor. |
DefaultSpinCount | public | Default number of busy waiting iterations used in instances of the class. |
Methods
create | public | Constructor for the class instance. |
Acquire | public | Limits thread access to the calling thread. |
Inherited
From TObject (40)
AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
