import asyncio


def batch_async_task(coro_list):
    """Execute a list of coroutines or futures concurrently.

    User may press Ctrl-C to cancel all given tasks.

    Parameters
    ----------
    coro_list :
        a list of coroutines or futures to run concurrently.

    Returns
    -------
    results :
        a list of return values or raised exceptions of given tasks.
    """
    top_future = asyncio.gather(*coro_list, return_exceptions=True)

    loop = asyncio.get_event_loop()
    try:
        print('Running tasks, Press Ctrl-C to cancel.')
        results = loop.run_until_complete(top_future)
    except KeyboardInterrupt:
        print('Ctrl-C detected, Cancelling tasks.')
        top_future.cancel()
        loop.run_forever()
        results = None

    return results