hmm, i think ive got my answer
here
so for join(), that should be something like
use threads;
my @kiddies;
foreach(1..10)
{
print "$$ starting loop $_";
push @kiddies, threads->new(\&thisWasAnElse);
print "$$ exiting loop $_";
}
sub thisWasAnElse
{
print "\tchild ", threads->tid() " created ok";
sleep(int(rand(10)));
print "\tchild", threads->tid() , " done, outta here";
}
foreach @kiddies { $_->join(); }
can i safely detach() inside the first foreach loop?
well the downloads complete, so lets see what happens...