Internet Direct (Indy) Version 9.0.1 Beta
TIdThread.Synchronize
Executes a method in the main VCL thread.

procedure Synchronize(Method: TThreadMethod);
Parameters
Method: TThreadMethod
VCL method to be executed.

Description
Synchronize is used to avoid multi-threading conflicts that can arise from accessing object properties or methods that are not thread-safe, or using resources not in the main thread of execution.

Execution of the thread is suspended while Synchronize completes the call to Method.

Note: Methods can also be protected using critical sections or the multi-read exclusive-write synchronizer.

Note: Synchronize is redeclared as a public method in TIdThread.