@retry(
        wait_exponential_multiplier=1000,
        wait_exponential_max=64000,
        retry_on_exception=retry_consensus_after_error
        )
    def achieve_consensus(self):

        log.info('Set up ZK client using host(s): %s', self._hosts)
        zk = KazooClient(hosts=self._hosts)

        # Initialize ZK connection state variable, which is shared across
        # threads. It is updated from a change listener function which is
        # invoked from within a Kazoo connection management thread, see
        # http://kazoo.readthedocs.org/en/latest/api/handlers/threading.html.
        self._connected = False
        zk.add_listener(self._zk_state_change_listener)
        zk.start()

        # Wait for handling thread to update connection status. (As of non-
        # determinism around GIL context switches there is otherwise no
        # guarantee that the status is updated within
        # `_run_consensus_procedure`).
        while not self._connected:
            time.sleep(0.01)

        self._zk = zk
        try:
            # This may raise ConnectionLost or various
            # kazoo.exceptions.* types.
            return self._run_consensus_procedure()
        finally:
            log.info('Shut down ZK client.')
            try:
                zk.stop()
            finally:
                zk.close()
Multiple requests can be sent subsequently to the server, and the
dataset/ETHPy150Open dcos/dcos/packages/zk-value-consensus/extra/consensus/consensus.py/ZKValueConsensus.achieve_consensus--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/test/test_memcache.py/MemCacheTestCase.test_pipelining