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

Re: Thread::Pool shutdown dies after abort

by lidden (Deacon)
on Jun 29, 2011 at 13:11 UTC ( #911968=note: print w/ replies, xml ) Need Help??


in reply to Thread::Pool shutdown dies after abort

Why are you using both abort and shutdown?
I think you are supposed to only use one of them depending on what you want. I do think the error message is confusing though.

From the fine manual.

shutdown $pool->shutdown; The "shutdown" method waits for all jobs to be executed, remove +s all worker threads, handles any results that still need to be strea +med, before it returns. Call the abort method if you do not want to + wait until all jobs have been executed. It is called automatically when the object is destroyed, unless specifically disabled by providing a false value with the "autoshutdown" field when creating the pool with new, or by cal +ling the autoshutdown method. abort The "abort" method waits for all worker threads to finish their current job, removes all worker threads, before it returns. Ca +ll the shutdown method if you want to wait until all jobs have been do +ne. You can restart the job handling process after calling "abort" +by adding workers again.


Comment on Re: Thread::Pool shutdown dies after abort
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-09-15 03:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls