[Twisted-Python] Twisted with callInThread

Itamar Turner-Trauring itamar at itamarst.org
Tue Nov 2 17:16:20 EDT 2010

> I have an app which I want to connect in and run a app that
> continually spits out data to stdout. Right now my app works but the
> issue is when the client exits the socket connection the /usr/bin/app
> still continues to run. The more socket connections made the more this
> app is still running.
> Is there anyway from the Echo Procool to kill the run_app() function?

Instead of using run_app (which I assume is in run in a thread?), using
reactor.spawnProcess will let you have the process management integrated
with Twisted:

More information about the Twisted-Python mailing list