Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Fork multi processes

by BrowserUk (Patriarch)
on May 04, 2012 at 09:37 UTC ( [id://968900]=note: print w/replies, xml ) Need Help??


in reply to Fork multi processes

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 );

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://968900]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2024-04-16 09:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found