(self)
Wait until notified.

        If the calling coroutine has not acquired the lock when this
        method is called, a RuntimeError is raised.

        This method releases the underlying lock, and then blocks
        until it is awakened by a notify() or notify_all() call for
        the same condition variable in another coroutine.  Once
        awakened, it re-acquires the lock and returns True.
Wait until notified.
Wait until notified .
async def wait(self):
        """Wait until notified.

        If the calling coroutine has not acquired the lock when this
        method is called, a RuntimeError is raised.

        This method releases the underlying lock, and then blocks
        until it is awakened by a notify() or notify_all() call for
        the same condition variable in another coroutine.  Once
        awakened, it re-acquires the lock and returns True.
        """
        if not self.locked():
            raise RuntimeError('cannot wait on un-acquired lock')

        self.release()
        try:
            fut = self._get_loop().create_future()
            self._waiters.append(fut)
            try:
                await fut
                return True
            finally:
                self._waiters.remove(fut)

        finally:
            # Must reacquire lock even if wait is cancelled
            cancelled = False
            while True:
                try:
                    await self.acquire()
                    break
                except exceptions.CancelledError:
                    cancelled = True

            if cancelled:
                raise exceptions.CancelledError
async def wait ( self ) : if not self . locked ( ) : raise RuntimeError ( 'cannot wait on un-acquired lock' ) self . release ( ) try : fut = self . _get_loop ( ) . create_future ( ) self . _waiters . append ( fut ) try : await fut return True finally : self . _waiters . remove ( fut ) finally : # Must reacquire lock even if wait is cancelled cancelled = False while True : try : await self . acquire ( ) break except exceptions . CancelledError : cancelled = True if cancelled : raise exceptions . CancelledError