Sign in Join
FPDoc Onlineexperiment

TThread.WaitFor function

Member of TThreadpublicIn unit Classes

Waits for the thread to terminate and returns the exit status.

Declaration

pascal
function 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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.