Topic Path: Symbol Reference > Classes > TIdAntiFreeze

Prevents an application User interface from freezing.

Indy works on the blocking model. That is... when calls are made to Indy, they do not return until they are complete. If calls are made in the main thread, this will cause the Application User Interface to "freeze" during Indy calls. TIdAntiFreeze counteracts this effect. TIdAntiFreeze allows Indy to process Application messages so that Windows messages continue to be executed while Indy blocking socket calls are in effect. 

Only one TIdAntiFreeze can be active in an application. If another instance already exists, an exception is raised. TIdAntiFreezeBase uses the global variable GAntiFreeze, declared in the TIdAntiFreezeBase unit, to determine if another instance has already been created. 

GAntiFreeze is not assigned if an instance is added in the form designer (during design time). 

The TIdAntiFreeze.pas unit must NOT appear in the uses clause of any Indy or descendant unit. This unit is linked in an application when the component is placed on a Form. This is done to preserve isolation from the Forms.pas and QForms.pas units.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.