From: "Stephen Kratzer" <[EMAIL PROTECTED]>

> I'm not too familiar with threads, but I'll give it a go. You're still
> executing the download() sub seventy times one after another rather than
> concurrently. The async function will created one new thread for the block
> following it. You might try a for loop which creates a new thread at each
> iteration.
>
> Maybe something like:
>
> my @threads;
>
> for (my $i = 1; $i <= 70; $i++) {
> $threads[$i] = threads->create(\&download, $i);
> $threads[$i]->join();
> }
>

I have tried this method, but it executes much slower than a simple for()
loop, with no threads at all.

I have tried it using perl, v5.8.7 built for MSWin32-x86-multi-thread.

Thank you.

Teddy


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to