Re: [Twisted-Python] Twisted with callInThread

2010-11-02 Thread Itamar Turner-Trauring
> 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 runnin

[Twisted-Python] Twisted with callInThread

2010-11-02 Thread Mike Zupan
I stripped down my app but this should give you an example of what i'm doing def run_app(f): p = Popen(['/usr/bin/app'],stdout=PIPE) while True: o = p.stdout.readline() if o == '' and p.poll() != None: break reactor.callFromThread(f, o) class Echo(Protocol): d