I'd like to be able to stop a ZEOServer instance from a separate thread. I've read ThreadedAsync.LoopCallback, which says to set exit_status to a non-none value to stop the server's main loop. I've tried doing this, but the server refuses to stop.

Should the following code allow a thread to terminate the server. Is there a better way than this?

class NewZEOServer(ZEOServer):

    def loop_forever(self):
        import ThreadedAsync.LoopCallback

    def stop(self):
        from ThreadedAsync.LoopCallback import exit_status
        exit_status = 1

Any help is appreciated.


For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to