(self)
return self.get_nowait()
Remove and return an item from the queue.

        If queue is empty, wait until an item is available.
Remove and return an item from the queue.
Remove and return an item from the queue .
async def get(self):
        """Remove and return an item from the queue.

        If queue is empty, wait until an item is available.
        """
        while self.empty():
            getter = self._get_loop().create_future()
            self._getters.append(getter)
            try:
                await getter
            except:
                getter.cancel()  # Just in case getter is not done yet.
                try:
                    # Clean self._getters from canceled getters.
                    self._getters.remove(getter)
                except ValueError:
                    # The getter could be removed from self._getters by a
                    # previous put_nowait call.
                    pass
                if not self.empty() and not getter.cancelled():
                    # We were woken up by put_nowait(), but can't take
                    # the call.  Wake up the next in line.
                    self._wakeup_next(self._getters)
                raise
        return self.get_nowait()
async def get ( self ) : while self . empty ( ) : getter = self . _get_loop ( ) . create_future ( ) self . _getters . append ( getter ) try : await getter except : getter . cancel ( ) # Just in case getter is not done yet. try : # Clean self._getters from canceled getters. self . _getters . remove ( getter ) except ValueError : # The getter could be removed from self._getters by a # previous put_nowait call. pass if not self . empty ( ) and not getter . cancelled ( ) : # We were woken up by put_nowait(), but can't take # the call.  Wake up the next in line. self . _wakeup_next ( self . _getters ) raise return self . get_nowait ( )