TaskUtilities Members

The TaskUtilities type exposes the following members.

Methods


  Name Description
Public method Static member AsTask(CancellationToken)
Allows using a Cancellation Token as if it were a task.
Public method Static member AsTask<(Of <<'(T>)>>)(CancellationToken)
Allows using a Cancellation Token as if it were a task.
Public method Static member AutoCancelingTask(TimeSpan)
Creates a task that automatically cancels after a given delay.
Public method Static member AutoCancelingTask(Int32)
Creates a task that automatically cancels after a given delay.
Public method Static member AutoCancelingTask<(Of <<'(T>)>>)(TimeSpan)
Creates a task that automatically cancels after a given delay.
Public method Static member AutoCancelingTask<(Of <<'(T>)>>)(Int32)
Creates a task that automatically cancels after a given delay.
Public method Static member AutoCancelingToken(TimeSpan)
Automatically cancels a CancellationToken after the indicated amount of time.
Public method Static member AutoCancelingToken(Int32)
Automatically cancels a CancellationToken after the indicated amount of time in milliseconds.
Public method Static member AutoCompletingTask<(Of <<'(T>)>>)(T, TimeSpan)
Creates a task that automatically completes after a given delay.
Public method Static member AutoCompletingTask<(Of <<'(T>)>>)(T, Int32)
Creates a task that automatically completes after a given delay.
Public method Static member DelaySafe(TimeSpan, CancellationToken)
Creates a cancellable task that completes after a specified time interval. This will not throw an exception if the cancellationToken is triggered or disposed.
Public method Static member DelaySafe(Int32, CancellationToken)
Creates a cancellable task that completes after a specified number of milliseconds. This will not throw an exception if the cancellationToken is triggered or disposed.
Public method Static member ForEachAsync(IReadOnlyCollection<(Of <<'(Func<(Of <<'(Task>)>>)>)>>))
Runs each action in parallel.
Public method Static member ForEachAsync<(Of <<'(T>)>>)(IReadOnlyCollection<(Of <<'(T>)>>), Func<(Of <<'(T, Task>)>>))
In parallel, performs the same asynchronous action on each element in the list.
Public method Static member RunConcurrently
Runs the Task in a concurrent thread without waiting for it to complete. This will start the task if it is not already running.
Public method Static member WaitForCompleteOrCancel
Wait for the indicated task to be completed or canceled.
Public method Static member WhenAll(IEnumerable<(Of <<'(Task>)>>), CancellationToken)
A version of Task.WhenAll that can be canceled.
Public method Static member WhenAll(IEnumerable<(Of <<'(Task>)>>))
Task.WhenAll as an extension method.
Public method Static member WhenAny(IEnumerable<(Of <<'(Task>)>>), CancellationToken)
A version of Task.WhenAny that can be canceled.
Public method Static member WhenAny(IEnumerable<(Of <<'(Task>)>>))
A version of Task.WhenAll that can be canceled.