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.
|
|---|