in reply to Thread::Pool::Simple || !
. But, it is not quiet reliable enough to put in a batch environment and ignore.
Hm. If it is "not reliable"; how does it break? And why haven't you wrapped that bit in an eval?
Come to that; why are you wrapping bits of the code in eval, why not just wrap all of it? Eg.
sub worker { my( ... ) = @_; eval { ... ... return 1 if <cond>; ... 1; } or threads->create( \&worker, @_ ); }
Just remember that when you want to quit the thread permanently, to drop out of the bottom of the eval block, or return a true value to avoid the restart.
|
|---|