TThread.WaitFor¶
Waits for the thread to terminate and returns the exit status.
Declaration¶
Source position: classesh.inc line 2550
public
function TThread.WaitFor : Integer;
Description¶
WaitFor waits for the thread to terminate, and returns the exit status. Note that when executed in the main thread, this method calls CheckSynchronize, this is done to avoid deadlocks: if the thread is waiting for a synchronize, then the synchronize methods will be executed and then the WaitFor will return.
See also¶
| Name | Description |
|---|---|
| TThread.Terminated | Indicates whether the Terminatemethod was called by the user. |
| TThread.WaitFor | Waits for the thread to terminate and returns the exit status. |
| TThread.FreeOnTerminate | Indicates whether the thread should free itself when it stops executing. |
| TThread.Synchronize | Synchronizes the thread by executing the method in the main thread. |