in reply to Multi Threading help

The first question that comes to mind is, why on earth would you need to run a dhcpclient script a 1000 times simultaneously? Are you setting up a thousand virtual interfaces on your machine and need to assign them an address instantly?

That being said, if your children do not need to share state use fork, if they do, investigate whether one of the IPC methods available are sufficient for your needs. If they're not, use threads. (This goes for *NIX, Windows apparently has its own issues with fork(), though I'm not knowledgeable enough about them to really comment).

For examples see the documentation for perlipc and threads.


All dogma is stupid.

Replies are listed 'Best First'.
Re^2: Multi Threading help
by drip (Beadle) on Feb 28, 2008 at 12:35 UTC
    the answer to your question would be ...that i am testing a dhcp server(that's all i can say for now)...thank you for the reply ;)
      You didn't specify the type of testing, but, if it's simply a load test, then it would probably be easier and more efficient to put together a custom DCHP client app which simply blasts the server with a stream of requests at your chosen rate (1000/second or whatever) rather than setting up 1000 separate clients.