TplExtensions.FollowCancelableTaskToCompletion<T> 메서드

정의

작업을 마칠 때 결과적으로 다른 작업 결과의 결과를 생성하는 작업을 가져옵니다. 대신 이 작업이 취소되면 해당 결과에 대해 후속 작업이 반복적으로 실행됩니다.

public static System.Threading.Tasks.Task<T> FollowCancelableTaskToCompletion<T> (Func<System.Threading.Tasks.Task<T>> taskToFollow, System.Threading.CancellationToken ultimateCancellation, System.Threading.Tasks.TaskCompletionSource<T> taskThatFollows = default);
public static System.Threading.Tasks.Task<T> FollowCancelableTaskToCompletion<T> (Func<System.Threading.Tasks.Task<T>> taskToFollow, System.Threading.CancellationToken ultimateCancellation, System.Threading.Tasks.TaskCompletionSource<T>? taskThatFollows = default);
static member FollowCancelableTaskToCompletion : Func<System.Threading.Tasks.Task<'T>> * System.Threading.CancellationToken * System.Threading.Tasks.TaskCompletionSource<'T> -> System.Threading.Tasks.Task<'T>
Public Function FollowCancelableTaskToCompletion(Of T) (taskToFollow As Func(Of Task(Of T)), ultimateCancellation As CancellationToken, Optional taskThatFollows As TaskCompletionSource(Of T) = Nothing) As Task(Of T)

형식 매개 변수

T

작업에서 반환하는 값의 형식입니다.

매개 변수

taskToFollow
Func<Task<T>>

결과가 다음 작업에서 반환되어야 하는 작업입니다.

ultimateCancellation
CancellationToken

취소 시 다음 작업을 취소해야 함을 나타내는 토큰입니다.

taskThatFollows
TaskCompletionSource<T>

작업이 따르는 TaskCompletionSource입니다. 새 작업을 만들려면 을 에 null 둡니다.

반환

Task<T>

다음 작업입니다.

적용 대상