コード例 #1
0
    def wait_for_all(self):
        """
        Test if network as a whole has terminated
        """
        import gevent

        try:
            for completed in gevent.iwait(self.runners):
                logger.debug("Component completed: {}".format(completed))
                # if an error occurred, skip deadlock testing
                if self.error is not None:
                    break

                # if the network was aborted, skip deadlock testing
                if self._abort:
                    break
        except gevent.hub.LoopExit:
            statuses = []
            if self.list_comp_status(statuses):
                self._signal_deadlock(statuses)
コード例 #2
0
 def indicate_terminated(self, comp):
     # -- synchronized (comp)
     comp.status = StatusValues.TERMINATED
     # -- end
     logger.debug("{}: Terminated", args=[comp])