Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Re: Re: Re: 3 weeks wasted? - will threads help?

by waswas-fng (Curate)
on Jan 28, 2003 at 15:23 UTC ( [id://230612]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: 3 weeks wasted? - will threads help?
in thread 3 weeks wasted? - will threads help?

Not exactly, my solution (although badly worded that late at night) was to (in psudo code):
while (1) { $totallistoffiles = glob all_dir_list/*; fork if child { proccess file list exit } else #parrent { sleep 2 } }
The parrents task is to grab the list of files (read all 20 directories) every x seconds fork and create a child that proccesses such list -- only to loop sleep and do it all over in x seconds. your only downside here is that the child has to (on average) execute faster than the sleep time of the parent otherwise you will slowly gain procs. I hope this clears it up.

-Waswas

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2024-04-23 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found