System.SyncObjs.TSpinLock.Create
Delphi
constructor Create(EnableThreadTracking: Boolean);
C++
__fastcall TSpinLock(bool EnableThreadTracking);
TSpinLock() {}
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
constructor | public | System.SyncObjs.pas System.SyncObjs.hpp |
System.SyncObjs | TSpinLock |
Description
Instantiates a TSpinLock object.
Call Create to create an instance of TSpinLock.
The EnableThreadTracking parameter is used to specify, at creation of TSpinLock, whether the lock should track the threads attempting to enter the lock. Because TSpinLock is non-reentrant, if EnableThreadTracking is set to True and a thread tries to call Enter a second time, an exception is raised. If EnableThreadTracking is set to False, the call causes a deadlock.