in reply to Threads: How to kill a thread manually?

... I cannot seem to find on any tutorials how to manually kill a thread.

There is no api for doing this using threads.

The best you can do is arrange for your thread(s) to check a shared flag at each iteration and to terminate if that flag becomes set.

Not so useful if your thread might enter a blocking IO call and so never get a chance to check the flag.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco.
Rule 1 has a caveat! -- Who broke the cabal?