Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: [Thread::Queue] How to handle unexpected termination and time out in threads

by BrowserUk (Pope)
on Apr 09, 2014 at 14:05 UTC ( #1081653=note: print w/ replies, xml ) Need Help??


in reply to [Thread::Queue] How to handle unexpected termination and time out in threads

So, when a worker thread die unexpectedly, where can I insert code to handle it?

How do you handle it when a non-threaded program might die unexpectedly?

A "non-threaded program", is actually a single-threaded program, and what works in one thread -- the main and only thread -- works just the same in any other thread. So do the same thing.

And, when a worker thread hangs for too long, where in the code can I time it out?

You know what I'm going to say right?

How do you handle this in a single-threaded program?

Do the same thing.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re: [Thread::Queue] How to handle unexpected termination and time out in threads

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2014-08-22 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (168 votes), past polls