Internet Direct (Indy)
Home
PreviousUpNext
TIdThread.Synchronize Method

Executes a thread method synchronized to the main VCL thread.

Pascal
procedure Synchronize(
    Method: TIdThreadMethod
); overload;
Parameters 
Description 
Method 
Thread method to execute with synchronization. 

Synchronize is an overloaded method 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 specified in Method. 

Methods can also be protected using critical sections or the multi-read exclusive-write synchronizer as an alternative to calling Synchronize.

TIdThread.Synchronize

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.