System.SyncObjs.TCriticalSectionHelper.TryEnter
Delphi
function TryEnter: Boolean; inline;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SyncObjs.pas | System.SyncObjs | TCriticalSectionHelper |
Description
Attempts to acquire a lock on the critical section.
Call TryEnter when attempting to lock the critical section.
If successful, the TryEnter method grants ownership of the critical section to the calling thread and returns True. Otherwise, it returns False and no ownership is granted.