A simple threaded solution. Substitute your rsync commands for the sleep.pl:
#! perl -slw use strict; use threads; for ( 1 .. 10 ) { async{ my $secs = rand 10; system "sleep.pl $secs"; }; sleep 1 while threads->list( threads::running ) > 5; $_->join for threads->list( threads::joinable ); } sleep 1 while threads->list( threads::running ); $_->join for threads->list( threads::joinable );
In reply to Re: Fork multi processes
by BrowserUk
in thread Fork multi processes
by saurya1979
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |