Some of you that are more experienced using Twisted will probably judge me about using it together with threads - but I did it :). And now I am in somehow of a trouble - I am having an application server that listens for client requests and each time a new client connects it spawns another thread that I probably forget to properly close, since after a while of heavy usage the server stops processing requests. Well, I have 3 different types of threads and for one of those it happens - the thing is that I am not sure what's the proper way to do it, since Thread.join()
seems to not work and doing cat /proc/<pid>/status
it always gives me Threads: 43
when the server stopped working.
So I am looking for a way of debugging this and see how can I properly close the threads.
And yeah, I know about this question:
http://stackoverflow.com/questions/323972/is-there-any-way-to-kill-a-thread-in-python
and probably many others.