Skip to content

EndThread

End the current thread.

Declaration

Source position: threadh.inc line 145

  procedure EndThread(ExitCode: DWord);
  procedure EndThread;

Description

EndThread ends the current thread. If ExitCode is supplied, it is returned as the exit code for the thread to a function waiting for the thread to terminate (WaitForThreadTerminate ). If it is omitted, zero is used.

This function does not return.

See also

Name Description
BeginThread Start a new thread.
WaitForThreadTerminate Wait for a thread to terminate.