def acquire(self):
        # maybe have max connection open time here
        """
        Acquire a connection from the Pool

        :returns: Future -
            :py:class:`asyncio.Future`, :py:class:`trollius.Future`, or
            :py:class:`tornado.concurrent.Future`
        """
        future = self._future_class()
        if self._pool:
            while self._pool:
                conn = self._pool.popleft()
                if not conn.closed:
                    pool_logger.debug("Reusing connection: {}".format(conn))
                    future.set_result(conn)
                    self._acquired.add(conn)
                    break
                else:
                    pool_logger.debug(
                        "Discarded closed connection: {}".format(conn))
        elif self.maxsize < self.size:
            self._acquiring += 1
            conn_future = self.graph.connect(
                force_release=self._force_release, pool=self)
            def cb(f):
                try:
                    conn = f.result()
                except Exception as e:
                    future.set_exception(e)
                else:
                    pool_logger.debug("Got new connection {}".format(conn))
                    self._acquired.add(conn)
                    future.set_result(conn)
                finally:
                    self._acquiring -= 1
            conn_future.add_done_callback(cb)
        else:
            pool_logger.debug(
                "Waiting for available conn on future: {}...".format(future))
            self._waiters.append(future)
        return future
dataset/ETHPy150Open davebshow/gremlinclient/gremlinclient/pool.py/Pool.acquire/swapped operands of `<`