Topic Path: Symbol Reference > Classes > TIdThread Class > TIdThread Methods > Synchronize Method
ContentsIndexHome
PreviousUpNext
TIdThread.Synchronize Method

Executes a thread method synchronized to the main VCL thread.

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

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