Rich Cooper wrote:
> How does the TidAntiFreeze control work?  Principles of operation
> would be nice to know if anyone can tell them.

The Indy controls all do blocking I/O. They expect to have the calling 
thread all to themselves. That means they're generally not appropriate 
for use in the application's main thread.

But since it's so tempting to put those components on a form and call 
them from the form's event handlers, TIdAntifreeze serves to allow the 
application thread to continue to process messages while the Indy 
components are doing their stuff. Indy's method calls are still blocking 
calls -- the statements after HTTP.Get, for instance, won't execute 
until after the entire Web resource gets downloaded and Get returns.

The internal methods occasionally call TIdAntifreezeBase.DoProcess. If 
that is called from the main thread, and if there is a TIdAntifreeze 
component active in the program, then that component will call 
Application.ProcessMessages.

-- 
Rob
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to