Think about Loose Coupling | |
PerlMonks |
Re: Threads: How to kill a thread manually?by BrowserUk (Patriarch) |
on Apr 26, 2005 at 18:33 UTC ( [id://451718]=note: print w/replies, xml ) | Need Help?? |
... 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?
In Section
Seekers of Perl Wisdom
|
|