System.Classes.TThread.WaitFor

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function WaitFor: LongWord;

C++

System::LongWord __fastcall WaitFor();

Properties

Type Visibility Source Unit Parent
function public
System.Classes.pas
System.Classes.hpp
System.Classes TThread

Description

Waits for the thread to terminate and then returns the value of the ReturnValue property.

Call WaitFor to obtain the value of ReturnValue when the thread finishes executing. WaitFor doesn't return until the thread terminates, so the thread must exit either by finishing the Execute method or by exiting when the Terminated property is true.

See Also


Code Examples