Added per-process timeout capability to run_async. Also changed contrib/evlang to use run_async

This commit is contained in:
Griatch 2012-09-03 21:16:54 +02:00
parent 5c6ee44039
commit 81dfeb6788
3 changed files with 30 additions and 13 deletions

View file

@ -11,6 +11,7 @@ class AMPChild(amp.AMP):
def connectionLost(self, reason):
amp.AMP.connectionLost(self, reason)
from twisted.internet import reactor
print "connectionLost called", reason
try:
reactor.stop()
except error.ReactorNotRunning:
@ -28,6 +29,9 @@ class AMPChild(amp.AMP):
import os
os._exit(-1)
def processEnded(self, *args, **kwargs):
print "processEnded called", args, kwargs
def shutdown(self):
"""
This method is needed to shutdown the child gently without