(self, pool)
Given a pool, cancel all adapter connections and wait until all
        runners gentle terminates.
Given a pool, cancel all adapter connections and wait until all
        runners gentle terminates.
Given a pool cancel all adapter connections and wait until all runners gentle terminates .
def _cancel_connections(self, pool):
        """Given a pool, cancel all adapter connections and wait until all
        runners gentle terminates.
        """
        pool.close()
        pool.terminate()

        adapter = get_adapter(self.config)

        if not adapter.is_cancelable():
            fire_event(QueryCancelationUnsupported(type=adapter.type()))
        else:
            with adapter.connection_named('master'):
                for conn_name in adapter.cancel_open_connections():
                    if self.manifest is not None:
                        node = self.manifest.nodes.get(conn_name)
                        if node is not None and node.is_ephemeral_model:
                            continue
                    # if we don't have a manifest/don't have a node, print
                    # anyway.
                    fire_event(PrintCancelLine(conn_name=conn_name))

        pool.join()
def _cancel_connections ( self , pool ) : pool . close ( ) pool . terminate ( ) adapter = get_adapter ( self . config ) if not adapter . is_cancelable ( ) : fire_event ( QueryCancelationUnsupported ( type = adapter . type ( ) ) ) else : with adapter . connection_named ( 'master' ) : for conn_name in adapter . cancel_open_connections ( ) : if self . manifest is not None : node = self . manifest . nodes . get ( conn_name ) if node is not None and node . is_ephemeral_model : continue # if we don't have a manifest/don't have a node, print # anyway. fire_event ( PrintCancelLine ( conn_name = conn_name ) ) pool . join ( )