in reply to Re^3: Should I use threads? Perl/DHCP/Radius
in thread Should I use threads? Perl/DHCP/Radius

I respect your aversion to using timers or the fileevent/select methods of eventloop toolkits, but once you learn to use them, they allow much more flexibility in design.

I already know how to use them. I was writing event-driven applications for Optical Mark Readers 25 years ago. And event-driven data transfer applications for racks of hand-held terminals 15 years ago.

And I also know what a pain they are to tune each time the software has to be moved to a different hardware configuration. And how much simpler life became when I could ditch those fussy, fragile event loops that forever need re-tuning and are a nightmare to debug. In favour of writing nice, straight forward linear code, testing and debugging it as a single-threaded app, and then just running multiple copies each in its own thread.

Timers and fileevents make things easier.

Sorry, but that is rubbish. You dream up and code some extension to the OPs scenario with events and I'll demonstrate it is easier with threads.

Maybe you just an old dog, who is averse to learning "new tricks"?

Not at all. You've just rediscovered an old bone of mine that I've long since discarded as chewed out :)


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.
RIP an inspiration; A true Folk's Guy
  • Comment on Re^4: Should I use threads? Perl/DHCP/Radius

Replies are listed 'Best First'.
Re^5: Should I use threads? Perl/DHCP/Radius
by zentara (Cardinal) on Aug 24, 2010 at 12:36 UTC
    To each their own.

    I'm sure the OP will soon discover the value of eventloop systems all on his own, regardless of what you or I say.


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku flash japh