RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCriticalSectionHelper.TryEnter Method

Attempts to acquire a lock on the critical section.

Pascal
function TryEnter: Boolean;
C++
__fastcall Boolean TryEnter();

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!