Indy 9
|
TIdSync = class(TObject)
TIdSync is used to act in behalf of the Indy thread instance specified in Thread, and also insures that at least a single instance of the Thread class has been created in the application.
An instance of TIdSync is used when TIdThread calls Notify, and is added to the global thread-based notifcation mechanism in GNotifyThread. GNotifyThread is used instead of PostMessage because of changes to the Synchronize method calls in Delphi 6 and Kylix, and also provides a low overhead notification mechanism for server applications.
property Thread: TIdBaseThread;
constructor Create; virtual; overload;
constructor Create(AThread: TIdBaseThread); virtual; overload;
procedure DoSynchronize; virtual; abstract;
Note: TIdSync provides synchronization and notification for threads. Descendant classes should override the DoSynchronize method to implement support for thread methods, or methods with parameters and/or return values.
procedure Synchronize;