in reply to related to threads
while (@dirs_to_ftp) { my $dir= shift @dirs_to_ftp; startthread($dir); while (threads->list(threads::running)>=2) { sleep 1; } foreach my $thr (threads->list(threads::joinable)) { $thr->join(); } } foreach my $thr (threads->list()) { $thr->join(); }
|
|---|