Classes.TThread.OnTerminate
From RAD Studio VCL Reference
Contents |
Delphi Information
From Classes.pas
property OnTerminate: TNotifyEvent read FOnTerminate write FOnTerminate;
Unit: Classes
Type: event
Visibility: public
Member Of: TThread
C++ Information
From Classes.hpp
__property TNotifyEvent OnTerminate;
Unit: Classes
Type: property
Visibility: public
Member Of: TThread
Description
Occurs after the thread's Execute method has returned and before the thread is destroyed.
Write an OnTerminate event handler to execute code after the thread finishes executing.
Note: The method assigned to the OnTerminate event is executed in the context of the main thread rather than the context of the thread being terminated. This means you can access the user interface of your application safely without calling the Synchronize method.