[Twisted-Python] A problem with very long blocking thread in Twisted

Reza Lotun rlotun at gmail.com
Wed Aug 10 10:15:38 EDT 2011

On Wed, Aug 10, 2011 at 2:49 PM, Heungsub Lee <h at subl.ee> 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.
Hi Heungsub,

Two options as far I as I can see:

1. Instead of having a blocking wait(), perhaps have it wait with a timeout?

2. Why don't you check out txAMQP, if you're doing amqp stuff - it has
native integration into Twisted. http://pypi.python.org/pypi/txAMQP

Keep in mind that if you set the thread as a daemon thread, the thread isn't
actually "killed", there just isn't a join() called, so it gets claimed by
the OS. This may be no different to what you want, but it's useful to keep
it in mind.


Reza Lotun
mobile: +44 (0)7521 310 763
email:  rlotun at gmail.com
work:   rlotun at twitter.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20110810/13aa88df/attachment-0001.htm 

More information about the Twisted-Python mailing list