[Overview][Types][Classes][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Implements a synchronization construct which provides thread-safe access to resources.
Source position: lazcollections.pas line 42
type TLazMonitor = class(TCriticalSection) |
||
public |
||
constructor create; |
|
Constructor for the class instance. |
procedure Acquire; override; |
|
Limits thread access to the calling thread. |
|
Number of busy waiting iterations used in the monitor. |
|
property DefaultSpinCount: Integer; [rw] |
|
Default number of busy waiting iterations used in instances of the class. |
end; |
|
Implements a synchronization construct which provides thread-safe access to resources. |
|
| | ||
| | ||
| | ||
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.
|
Limits thread access to the calling thread. |
|
|
Number of busy waiting iterations used in the monitor. |
|
|
Default number of busy waiting iterations used in instances of the class. |
|
|
Implements a thread-safe FIFO queue for items of a generic type. |
|
Version 4.0 | Generated 2025-05-03 | Home |