Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi thread.

Status
Not open for further replies.

Pimt

Programmer
Joined
Dec 12, 2001
Messages
2
Location
GB
Hello,

Im creating an application which retrives information from internet. What I need is several threads which retrieve information simultanious.
My question now is:
Is it best to setup the threads and feed them with information. Thus keeping the threads alive.
Or
Setup a thread with new information and let finish.
And then startup the next thread. Ofcourse about 6 to 10 simultanious.

Kind regards,
Pim
 
Hiya Pim,

It's easier to do this with multiple processes than with threads (which is probably why we've all been hoping that someone *else* would answer your question :-) sorry about that)

I would use fork() to start off a child process that would retrieve data into local files then, when all of the child processes had finished, they could be processed.

I've never used threads in Perl, and I don't intend to until they're stable; it's experimental at the moment. Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top