Пример #1
0
 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
Пример #2
0
    def stop(self):
        for CSA in self.connectedSockets:
            self.handleClosedCSA(shutdownCSA(self, CSA))

        self.send(serverShutdown(), "_serversignal")
        super(ServerCore, self).stop()
Пример #3
0
    def stop(self):
        for CSA in self.connectedSockets:
            self.handleClosedCSA(shutdownCSA(self, CSA))

        self.send(serverShutdown(), "_serversignal")
        super(SimpleServer, self).stop()
Пример #4
0
 def stop(self):
     self.send(producerFinished(self), "signal")
     self.CSA._deliver(producerFinished(self),"control")
     self.myPLS._deliver(serverShutdown(self),"control")
     super(SingleServer,self).stop()
Пример #5
0
 def stop(self):
     self.send(producerFinished(self), "signal")
     self.CSA._deliver(producerFinished(self), "control")
     self.myPLS._deliver(serverShutdown(self), "control")
     super(SingleServer, self).stop()