def get_results_generator(future_list, timeout=None, sort_by_completed=False):
    """Return as a generator of tasks order by completed sequence."""
    try:
        # python2 not support yield from
        if sort_by_completed:
            for future in as_completed(future_list, timeout=timeout):
                yield future.x
        else:
            for future in future_list:
                yield future.x
    except TimeoutError:
        return
Return as a generator of tasks order by completed sequence.