[Twisted-Python] twisted threading server has to be stopped with KILL

snacktime snacktime at gmail.com
Tue Feb 8 14:57:11 EST 2005

On Tue, 08 Feb 2005 14:36:04 -0500, Itamar Shtull-Trauring
<itamar at itamarst.org> wrote:
> On Tue, 2005-02-08 at 11:17 -0800, snacktime wrote:
> > I have a server that uses threads, and when run standalone or via
> > twistd as an application I have to send it a KILL signal if it has
> > already answered at least one request.  Or in some cases if I just
> > send it an INT it will stop if it's currently handling a lot of
> > requests at the time I send it the signal.  Seems like there is
> > something I am not doing here that I should be when  using threads?
> The system will stop  when all threads are finished, which happens when
> they finish their current task. Since that may be blocking (possibly
> indefinitely) the program may never exit cleanly. This is a general
> problem with blocking calls and not threads, and is not Twisted
> specific.

The only place I call threads is through deferToThread, and the server
still hangs even after all the threads called with deferToThread have
run and their callbacks processed.  What other threads could there be
that are blocking?

More information about the Twisted-Python mailing list