twisted problem with reactor.stop()

Jean-Paul Calderone exarkun at divmod.com
Sun Dec 3 10:52:10 EST 2006


On 3 Dec 2006 03:16:44 -0800, maxime_phan at hotmail.com wrote:
>hello, everyone
>I use twisted 1.3 in my python application.
>in my program, I have one server and on client running at same time (so
>2 reactor.run(installSignalHandlers=0) )
>the client run in one thread and the server in an other thread (
>reactor.callInThread(self.client... , reactor.callInThread(self.server
>....)
>when I catch "escape" button, I make a reactor.stop() but it doesn't
>seem to work and quit, and the application freeze. does anyone have any
>solution to quit the application with twisted?
>thanks in advance
>Maxime

Don't do this.  You don't need separate threads for client and server
code.  There is only one reactor, and you can only run it in one thread.
Use it for both your client and your server.

Jean-Paul



More information about the Python-list mailing list