On Wed, Aug 10, 2011 at 15:35, Itamar Turner-Trauring <ita...@itamarst.org> wrote: >> To solve this problem, I'd like to set threads as daemon. So that all >> related threads are terminated when main loop is interrupted. Any idea on >> this problem will be appreciated. > > I've seen daemon threads causing core dumps on shutdown. Better to either > use a library that doesn't use threads (which as mentioned is possible in > this case), or have a timeout on your blocking wait.
When the choice is between aborting a thread and potentially dumping core, and not exiting, I'll take dumping core. In order to implement this in twisted, you need to subclass ThreadPool and override the method that creates the Thread object, or alternatively, don't use reactor.callInThread(). If you can substitute a threadpool for txAMPQ then that will probably be the cleanest way. Stephen. _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python