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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.