JoinableTaskFactory.MainThreadAwaiter Structure
An awaiter struct that facilitates an asynchronous transition to the main thread.
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
Public Structure MainThreadAwaiter _
Implements INotifyCompletion
public struct MainThreadAwaiter : INotifyCompletion
public value class MainThreadAwaiter : INotifyCompletion
[<Sealed>]
type MainThreadAwaiter =
struct
interface INotifyCompletion
end
JScript supports the use of structures, but not the declaration of new ones.
The JoinableTaskFactory.MainThreadAwaiter type exposes the following members.
Properties
Name | Description | |
---|---|---|
IsCompleted | Determines whether the caller is already on the main thread. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Indicates whether this instance and a specified object are equal. (Inherited from ValueType.) | |
GetHashCode | Returns the hash code for this instance. (Inherited from ValueType.) | |
GetResult | Called on the main thread to prepare it to execute the continuation. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
OnCompleted | Called on the main thread to prepare it to execute the continuation. | |
ToString | Returns the fully qualified type name of this instance. (Inherited from ValueType.) |
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.