Internet Direct (Indy)
Home
PreviousUpNext
TCriticalSection.TryEnter Method

Attempts to start resource protection for the critical section.

Pascal
function TryEnter: Boolean;

Boolean - True on success.

TryEnter is a Boolean function that attempts to start resource protection for the critical section on the .Net platform. 

TryEnter calls the System.Threading.Monitor.TryEnter method in the FCL using the current object instance as an argument. 

TryEnter returns True if resource protection was successfully initiated for the current object instance. 

Use Release or Leave to stop resource protection for the critical section.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.