in reply to Re^4: Trying to thread a daemon with threads and Thread::Queue
in thread Trying to thread a daemon with threads and Thread::Queue

BrowserUK, an older post of yours on the subject (from 2006) enlightened me, and I was able to find out what the problem was and solved my issues. Thank you so much..

Gah! You're too generous. I should have remembered and recognised that problem and saved you a couple of days. I'm glad you've achieved your goal.

However, I still fail to see how spawning a new thread, or just transfering the socket to a thread pool is going to operate more quickly than just printing one short line, closing the connection and going back to the accept. Whilst a single push to a queue is going to be faster than IO to a socket, given that you're now setting up the listener queue, the tcp stack should be able to buffer the connections long enough to make the difference moot.

Did you do any soak testing yet?


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.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."
  • Comment on Re^5: Trying to thread a daemon with threads and Thread::Queue

Replies are listed 'Best First'.
Re^6: Trying to thread a daemon with threads and Thread::Queue
by jasmineaura (Initiate) on Aug 29, 2008 at 04:35 UTC
    Bleh! I updated my post after I realized another problem, and found you already replied back :|
    I can't do any testing yet, due to the problem I described in my previous (updated) reply..

    I am not really concerned about the speed of the response of the threaded version of this script vs. the non-threaded version. The whole idea was to allow handling multiple simultaneous connections/requests, in case one client is really lazy or slow, I don't want it to delay other clients/requests for several seconds.

    Still, I am curious to test it and see the difference, once I get it working :)