I'm writing a SOAPpy server in a thread, and having a problem handling the
exiting

What happens is handle_request() blocks until a request comes in. so the
thread exit's normally once a request comes in, but the server could sit
running for hours before a request comes in.
is there a non-blocking method i can call before i call handle_request

I've played around with socket timeouts but haven't had much success.  is
there a way to do this?

here's my code current code:

        def run(self):
                self._server = SOAPpy.SOAPServer(self._addr)
                self._server.registerObject(self,self._NS)
                logging.info("Starting Soap Server (ctrl+c to stop)")
                while not self._stopevent.isSet():
                        self._server.handle_request()
                        self._stopevent.wait(self._sleepPeriod)

        def join(self, timeout=None):
                self._stopevent.set()
                threading.Thread.join(self, timeout)
                self._server.server_close()
                logging.warning("Exiting Thread :%s" %(self.getName()))


-- 
Thanks
Kevin Anthony
www.NoSideRacing.com
732.793.3473
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to