Deletes a thread.
Err DeleteThread( Item x )
This procedure deletes a thread.
The procedure returns a value greater than or equal to 0 if the thread was successfully deleted or an error code if an error occurs.
Convenience call implemented in clib.lib V20.
Although threads may be deleted as soon as the parent task has finished using it by calling DeleteThread()
, threads are automatically deleted when they return, call exit(),
or when their parent task is deleted or dies.
Threads share memory with their parent tasks. This means that:
If you create a thread using CreateThread()
, you must delete it using DeleteThread()
, which does special cleanup work.
CreateThread
(), exit()