# Path: external/asyncio/tasks.py
# def coroutine(func):
#     """Decorator to mark coroutines.
# 
#     If the coroutine is not yielded from before it is destroyed,
#     an error message is logged.
#     """
#     if inspect.isgeneratorfunction(func):
#         coro = func
#     else:
#         @functools.wraps(func)
#         def coro(*args, **kw):
#             res = func(*args, **kw)
#             if isinstance(res, futures.Future) or inspect.isgenerator(res):
#                 res = yield from res
#             return res
# 
#     if not _DEBUG:
#         wrapper = coro
#     else:
#         @functools.wraps(func)
#         def wrapper(*args, **kwds):
#             w = CoroWrapper(coro(*args, **kwds), func)
#             w.__name__ = func.__name__
#             if _PY35:
#                 w.__qualname__ = func.__qualname__
#             w.__doc__ = func.__doc__
#             return w
# 
#     wrapper._is_coroutine = True  # For iscoroutinefunction().
#     return wrapper


import collections
import heapq
from . import events
from . import futures
from . import locks
from .tasks import coroutine

    def _consume_done_putters(self):
        # Delete waiters at the head of the put() queue who've timed out.
        while self._putters and self._putters[0][1].done():
            self._putters.popleft()

    def qsize(self):
        """Number of items in the queue."""
        return len(self._queue)

    @property
    def maxsize(self):
        """Number of items allowed in the queue."""
        return self._maxsize

    def empty(self):
        """Return True if the queue is empty, False otherwise."""
        return not self._queue

    def full(self):
        """Return True if there are maxsize items in the queue.

        Note: if the Queue was initialized with maxsize=0 (the default),
        then full() is never True.
        """
        if self._maxsize <= 0:
            return False
        else:
            return self.qsize() >= self._maxsize


# Path: external/asyncio/tasks.py
# def coroutine(func):
#     """Decorator to mark coroutines.
# 
#     If the coroutine is not yielded from before it is destroyed,
#     an error message is logged.
#     """
#     if inspect.isgeneratorfunction(func):
#         coro = func
#     else:
#         @functools.wraps(func)
#         def coro(*args, **kw):
#             res = func(*args, **kw)
#             if isinstance(res, futures.Future) or inspect.isgenerator(res):
#                 res = yield from res
#             return res
# 
#     if not _DEBUG:
#         wrapper = coro
#     else:
#         @functools.wraps(func)
#         def wrapper(*args, **kwds):
#             w = CoroWrapper(coro(*args, **kwds), func)
#             w.__name__ = func.__name__
#             if _PY35:
#                 w.__qualname__ = func.__qualname__
#             w.__doc__ = func.__doc__
#             return w
# 
#     wrapper._is_coroutine = True  # For iscoroutinefunction().
#     return wrapper


# Path: external/asyncio/queues.py
import collections
import heapq
from . import events
from . import futures
from . import locks
from .tasks import coroutine


    def _consume_done_putters(self):
        # Delete waiters at the head of the put() queue who've timed out.
        while self._putters and self._putters[0][1].done():
            self._putters.popleft()

    def qsize(self):
        """Number of items in the queue."""
        return len(self._queue)

    @property
    def maxsize(self):
        """Number of items allowed in the queue."""
        return self._maxsize

    def empty(self):
        """Return True if the queue is empty, False otherwise."""
        return not self._queue

    def full(self):
        """Return True if there are maxsize items in the queue.

        Note: if the Queue was initialized with maxsize=0 (the default),
        then full() is never True.
        """
        if self._maxsize <= 0:
            return False
        else:
            return self.qsize() >= self._maxsize


    @coroutine