There's more than one way to do things | |
PerlMonks |
Re^5: Sharing sockets between the main script and threadby BrowserUk (Patriarch) |
on Nov 30, 2008 at 15:39 UTC ( [id://726911]=note: print w/replies, xml ) | Need Help?? |
There actually is a bonus question .... If you run the server .... Everything will hang. Maybe it's a platform difference, but I commented out the select at the top, and then the sleep at the bottom, and nothing changed. No hang. Everything just ran a little faster. As for the code. You are using a shared hash, locking, and two queues to achieve what this code achieves with a single queue and no locking. And for no benefit that I can perceive. 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.
In Section
Seekers of Perl Wisdom
|
|