Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


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?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://451718]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-04-24 09:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found