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.
Utility methods for working across threads.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Threading.ThreadingTools
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public NotInheritable Class ThreadingTools
public static class ThreadingTools
[ExtensionAttribute]
public ref class ThreadingTools abstract sealed
[<AbstractClass>]
[<Sealed>]
type ThreadingTools = class end
public final class ThreadingTools
The ThreadingTools type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() ![]() |
Apply | Applies the specified SynchronizationContext to the caller's context. |
![]() ![]() |
ApplyChangeOptimistically<T> | |
![]() ![]() |
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. |
![]() ![]() |
WithCancellation<T>(Task<T>, CancellationToken) |
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.