def main(self): self.timebomb.activate() self.child.activate() yield 1 while not (self.child._isStopped() or (self.dataReady('_trigger') and self.recv('_trigger') is True)): self.pause() yield 1 if not self.timebomb._isStopped(): self.send(producerFinished(), '_disarm') shutdown_messages = [ producerFinished(), shutdownMicroprocess(), serverShutdown(), shutdown() ] for msg in shutdown_messages: if not self.child._isStopped(): self.send( msg, "_sigkill") yield 1 yield 1 else: break self.removeChild(self.child) yield 1 if not self.child._isStopped(): self.child.stop() yield 1 if 'signal' in self.Outboxes: self.send(shutdownMicroprocess(), 'signal') yield 1
def stop(self): for CSA in self.connectedSockets: self.handleClosedCSA(shutdownCSA(self, CSA)) self.send(serverShutdown(), "_serversignal") super(ServerCore, self).stop()
def stop(self): for CSA in self.connectedSockets: self.handleClosedCSA(shutdownCSA(self, CSA)) self.send(serverShutdown(), "_serversignal") super(SimpleServer, self).stop()
def stop(self): self.send(producerFinished(self), "signal") self.CSA._deliver(producerFinished(self),"control") self.myPLS._deliver(serverShutdown(self),"control") super(SingleServer,self).stop()
def stop(self): self.send(producerFinished(self), "signal") self.CSA._deliver(producerFinished(self), "control") self.myPLS._deliver(serverShutdown(self), "control") super(SingleServer, self).stop()