resume(with:)

    Resume the task that’s awaiting the continuation by returning or throwing the given result value.

    iOS
    13.0+
    macOS
    10.15+
    tvOS
    13.0+
    watchOS
    6.0+
    func resume<Er>(with result: sending Result<T, Er>) where E == any Error, Er : Error

    Parameters

    result

    The result. If it contains a .success value, the continuation returns that value; otherwise, it throws the .error value.

    A continuation must be resumed exactly once. If the continuation has already resumed, then calling this method results in undefined behavior.

    After calling this method, control immediately returns to the caller. The task continues executing when its executor schedules it.

    Other members in extension

    Instance members