stopThread()

Stops a thread.

Synopsis

int stopThread(int threadId);

Parameters

Parameter Description
threadId ID number of the thread to be stopped.

Return value

0, in the event of errors -1.

Errors

Missing/incorrect argument, for example, the specified thread does not exist.

Description

Stops the thread with the identification number threadId.

A thread can only be stopped in the instance it was started in.

It is not possible to stop the current thread: stopThread(getThreadId()).

Example

  main()
  {
      stopThread(40);
   }

Assignment

Threads

Availability

CTRL