async def async_connect(self):
if self._waiters is None:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>if self._waiters or self.max_connections and (len(self._in_use) >= self.max_connections):<EOL><INDENT>waiter = asyncio.Future(loop=self._loop)<EOL>self._waiters.append(waiter)<EOL>try:<EOL><INDENT>logger.debug('<STR_LIT>')<EOL>await waiter<EOL><DEDENT>finally:<EOL><INDENT>self._waiters.remove(waiter)<EOL><DEDENT><DEDENT>self.connect()<EOL>return self._state.conn<EOL>
Asyncronously wait for a connection from the pool.