[Twisted-Python] 2 threads questions
twisted-python at 2xlp.com
Tue Mar 27 12:03:44 EDT 2007
i have a threaded daemon which occasionally hangs because of some
stalling in the threadpool
a- whats the best way to shut it down ?
attempts to ctl-c / kill it seem to be interpreted by a random
thread. the only way to kill it is a kill -9
the python threading docs said that was the expected behavior, and
that it could be avoided by using signal.
I figured twisted might have something in it already to handle
shutting down a reactor with active threads. the threads docs for
twisted are a little light.
b- i'm trying to figure out the cause of the stalling in the threadpool
from the status messages i'm printing, I'm seeing the main python
code firing fine, but the threadpool is just stuck - nothing
dispatched to it seems to clean up
i wonder if it might be related to a few tickets i've seen
i'm trying to figure out a way to reliably test this. i've got a
ssh manhole running via conch ( and instructions from the twisted book )
can anyone suggest a good way to test and try to debug what is going
on? i'm extremely uninformed when it comes to python threads.
More information about the Twisted-Python