Compartir a través de


ThreadingTools.WithCancellation Method

Include Protected Members
Include Inherited Members

Wraps a task with one that will complete as cancelled based on a cancellation token, allowing someone to await a task but be able to break out early by cancelling the token.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

  Name Description
Public methodStatic member WithCancellation(Task, CancellationToken) Wraps a task with one that will complete as cancelled based on a cancellation token, allowing someone to await a task but be able to break out early by cancelling the token.
Public methodStatic member WithCancellation<T>(Task<T>, CancellationToken)

Top

See Also

Reference

ThreadingTools Class

Microsoft.VisualStudio.Threading Namespace