SemysThreadStop

01 Tries to stop a running thread.
02

int32 SemysThreadStop(HSemysThread thread, int32 waitUntilStopped);

03 Parameters:
  • thread: The thread to stop.
  • waitUntilStopped: Nonzero if the function should block until the thread run function returned (See description).
04 Return Values:
Nonzero if the thread run function is not executed anymore.
05 This function automatically returns 1 if the thread was already stopped.
06 If the thread is still running, it first calls the thread abort function (if it has been set); a call to SemysThreadShouldRun() will return 0 from that point on.
If the function should wait until the run function returns it does so unless the thread to stop is the calling thread itself.
07 The thread abort function will be called every time SemysThreadStop() is called for a running thread.
08 Note that even when the thread run function returned by itself before a call to SemysThreadStop(), the thread still is considered 'running'.
09 Reference: SemysThreading.h
Implementation: Semys Library
See Also: Threading Sub-System, SemysThreadStart(), SemysThreadDestroy(), SemysThreadAbort()

Goto: Main Page; This page is part of the Semys software documentation. See About: Documentation for details.