# Path: concert/config.py
# AIODEBUG = 9
# 
# Path: concert/coroutines/base.py
# def background(coroutine):
#     """Same as :func:`.start`, just meant to be used as a decorator."""
#     @functools.wraps(coroutine)
#     def inner(*args, **kwargs):
#         return start(coroutine(*args, **kwargs))
# 
#     return inner


import asyncio
import logging
        import numpy as np
from concert.config import AIODEBUG
from concert.coroutines.base import background
        When the object is called we store every item in an attribute which
        can be recovered later.
        """
        async for item in producer:
            self.result = item


@background
async def null(producer):
    """
    null(producer)

    A black-hole.
    """
    try:
        async for item in producer:
            pass
    except asyncio.CancelledError:
        LOG.log(AIODEBUG, 'null cancelled')
        raise


class Accumulate(object):
    """Accumulate items in a list or a numpy array if *shape* is given, *dtype* is the data type.
    """

    def __init__(self, shape=None, dtype=None):

        self.items = [] if shape is None else np.empty(shape, dtype=dtype)


# Path: concert/config.py
# AIODEBUG = 9
# 
# Path: concert/coroutines/base.py
# def background(coroutine):
#     """Same as :func:`.start`, just meant to be used as a decorator."""
#     @functools.wraps(coroutine)
#     def inner(*args, **kwargs):
#         return start(coroutine(*args, **kwargs))
# 
#     return inner


# Path: concert/coroutines/sinks.py
import asyncio
import logging
        import numpy as np
from concert.config import AIODEBUG
from concert.coroutines.base import background

        When the object is called we store every item in an attribute which
        can be recovered later.
        """
        async for item in producer:
            self.result = item


@background
async def null(producer):
    """
    null(producer)

    A black-hole.
    """
    try:
        async for item in producer:
            pass
    except asyncio.CancelledError:
        LOG.log(AIODEBUG, 'null cancelled')
        raise


class Accumulate(object):
    """Accumulate items in a list or a numpy array if *shape* is given, *dtype* is the data type.
    """

    def __init__(self, shape=None, dtype=None):

        self.items = [] if shape is None else np.empty(shape, dtype=dtype)


    @background