|
I have following code contstuct for my thread implemention, However only 1 thread finishes and the script got hanged, no errors,no warnings.
while ( my @batchArr=$sth->fetchrow_array()){
my %batchAcctsHash = &getAccounts(parameters.....);
threads->create(sub {doAudit(param1,\%hahparam2,$param3)});
}
foreach $thread (threads->list()){
$thread->join();
}
sub doAudit{
$param1=$_[0];
%param2=%{$_[1]};
$param3 =$_[2];
code...which call subroutines from user defined module.
}
this code generate 3 threads but only 1 of them finishes and script got hanged.
Please suggests.
amolk |