Why did you put a 'do' block inside a while loop? The while loop is going to do the block inside it anyway.
$workq->end();
I couldn't replicate your error.
There is no end() method listed in the POD for Thread::Queue. Did you test this code? I got a 'Can't locate object method "end"...' warning for this line.
$workq->enqueue($urls[0], $urls[1], $urls[2]);
Why not this? $workq->enqueue(@urls);
You get $url from $workq then override it with each of the urls from @urls? Wouldn't this make each thread access every url?while(defined(my $url = $workq->dequeue)) { do { my $ua = LWP::UserAgent->new; foreach my $url (@urls) {
In reply to Re^2: perl threads exiting abnormally
by Lotus1
in thread perl threads exiting abnormally
by srchulo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |