Internet Direct (Indy)
Home
PreviousUpNext
TIdAntiFreezeBase.ShouldUse Method

Indicates that a TIdAntiFreezeBase descendant is in use, and processor cycles should be yielded to the main thread.

Pascal
class function ShouldUse: Boolean; virtual;

Boolean - True when the calling client is in the main thread and an active TIdAntiFreezeBase descendant is in use.

ShouldUse is a virtual Boolean class function that indicates when a TIdAntiFreezeBase descendant is in use in an application, and that the component should yield to the main thread of execution. 

ShouldUse accesses the GAntiFreeze variable to determine if a TIdAntiFreeze instance has been assigned and activated. 

ShouldUse will return True when all of the following conditions are met: 

 

Condition 
Description 
Not nil. 
Active property value is True. 
Return value is True. 

 

ShouldUse is called from the Sleep method, as well as in TIdSocketHandle and TIdIOHandlerStack methods that implement connection timeout features.

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.