On Tue, 2010-11-16 at 16:29 -0800, RSGames Support wrote:
> Hi,
> I have found something interesting. When I do not call sys.exit(), and just 
> call this:  reactor.callFromThread(reactor.stop), the program exits properly. 
> I was wondering if it was safe to not call sys.exit()? If so I think the 
> problem is fixed.

sys.exit() will raise an exception, SystemExit. It's certainly possible
that raising it will cause problems, though I wouldn't expect it to keep
threads from exiting. It's possible there's some race condition involved
that is less likely to happen due to this change. Regardless, You should
not call it if you're using Twisted (or if you do, it should be called
after reactor.run()).


_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to