(source, dest)
Internal helper to copy state from another Future.

    The other Future may be a concurrent.futures.Future.
Internal helper to copy state from another Future.
Internal helper to copy state from another Future .
def _copy_future_state(source, dest):
    """Internal helper to copy state from another Future.

    The other Future may be a concurrent.futures.Future.
    """
    assert source.done()
    if dest.cancelled():
        return
    assert not dest.done()
    if source.cancelled():
        dest.cancel()
    else:
        exception = source.exception()
        if exception is not None:
            dest.set_exception(_convert_future_exc(exception))
        else:
            result = source.result()
            dest.set_result(result)
def _copy_future_state ( source , dest ) : assert source . done ( ) if dest . cancelled ( ) : return assert not dest . done ( ) if source . cancelled ( ) : dest . cancel ( ) else : exception = source . exception ( ) if exception is not None : dest . set_exception ( _convert_future_exc ( exception ) ) else : result = source . result ( ) dest . set_result ( result )