(concurrent, source)
Copy state from a future to a concurrent.futures.Future.
Copy state from a future to a concurrent.futures.Future.
Copy state from a future to a concurrent . futures . Future .
def _set_concurrent_future_state(concurrent, source):
    """Copy state from a future to a concurrent.futures.Future."""
    assert source.done()
    if source.cancelled():
        concurrent.cancel()
    if not concurrent.set_running_or_notify_cancel():
        return
    exception = source.exception()
    if exception is not None:
        concurrent.set_exception(_convert_future_exc(exception))
    else:
        result = source.result()
        concurrent.set_result(result)
def _set_concurrent_future_state ( concurrent , source ) : assert source . done ( ) if source . cancelled ( ) : concurrent . cancel ( ) if not concurrent . set_running_or_notify_cancel ( ) : return exception = source . exception ( ) if exception is not None : concurrent . set_exception ( _convert_future_exc ( exception ) ) else : result = source . result ( ) concurrent . set_result ( result )