Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Extensions to the Task Parallel Library.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Threading.TplExtensions
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public NotInheritable Class TplExtensions
public static class TplExtensions
[ExtensionAttribute]
public ref class TplExtensions abstract sealed
[<AbstractClass>]
[<Sealed>]
type TplExtensions = class end
public final class TplExtensions
The TplExtensions type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() ![]() |
AppendAction | Schedules some action for execution at the conclusion of a task. |
![]() ![]() |
ApplyResultTo<T>(Task, TaskCompletionSource<T>) | |
![]() ![]() |
ApplyResultTo<T>(Task<T>, TaskCompletionSource<T>) | |
![]() ![]() |
AttachToParent(Task) | Creates a task that is attached to the parent task, but produces the same result as an existing task. |
![]() ![]() |
AttachToParent<T>(Task<T>) | |
![]() ![]() |
FollowCancelableTaskToCompletion<T> | |
![]() ![]() |
Forget | Consumes a task and doesn't do anything with it. Useful for fire-and-forget calls to asynchronous methods within asynchronous methods. |
![]() ![]() |
InvokeAsync(AsyncEventHandler, Object, EventArgs) | Invokes asynchronous event handlers, returning a task that completes when all event handlers have been invoked. Each handler is fully executed (including continuations) before the next handler in the list is invoked. |
![]() ![]() |
InvokeAsync<TEventArgs>(AsyncEventHandler<TEventArgs>, Object, TEventArgs) | Invokes asynchronous event handlers, returning a task that completes when all event handlers have been invoked. Each handler is fully executed (including continuations) before the next handler in the list is invoked. |
![]() ![]() |
NoThrowAwaitable | Returns an awaitable for the specified task that will never throw, even if the source task faults or is canceled. |
![]() ![]() |
ToApm(Task, AsyncCallback, Object) | Converts a TPL task to the Asynchronous Programming Model (APM) Begin-End pattern. |
![]() ![]() |
ToApm<TResult>(Task<TResult>, AsyncCallback, Object) | |
![]() ![]() |
WaitWithoutInlining | Wait on a task without possibly inlining it to the current thread. |
Top
Fields
Name | Description | |
---|---|---|
![]() ![]() |
CanceledTask | A task that is already canceled. |
![]() ![]() |
CompletedTask | A singleton completed task. |
![]() ![]() |
FalseTask | A completed task with a false result. |
![]() ![]() |
TrueTask | A completed task with a true result. |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.