Dispatcher Class
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Provides services for maintaining the event queue for a thread.
Inheritance Hierarchy
System. . :: . .Object
Microsoft.SPOT..::..Dispatcher
Namespace: Microsoft.SPOT
Assembly: Microsoft.SPOT.TinyCore (in Microsoft.SPOT.TinyCore.dll)
Syntax
'Declaration
Public NotInheritable Class Dispatcher
public sealed class Dispatcher
public ref class Dispatcher sealed
[<Sealed>]
type Dispatcher = class end
public final class Dispatcher
The Dispatcher type exposes the following members.
Properties
Name | Description | |
---|---|---|
CurrentDispatcher | Gets the dispatcher for the thread that is currently executing and creates a new dispatcher if one is not already associated with the current thread. | |
HasShutdownFinished | Determines whether the current dispatcher has finished shutting down. | |
HasShutdownStarted | Determines whether the current dispatcher is shutting down. | |
Thread | Gets the thread with which the current dispatcher is associated. |
Top
Methods
Name | Description | |
---|---|---|
BeginInvoke | Executes a specified delegate on the thread on which a particular dispatcher was created. | |
CheckAccess | Determines whether the calling thread has access to the current dispatcher. | |
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
FromThread | Gets the dispatcher for a specified thread. | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Invoke | Executes a specified delegate with a specified argument. | |
InvokeShutdown | Initiates the shutdown process for a dispatcher synchronously. | |
PushFrame | Pushes an execution frame onto the event queue of a dispatcher. | |
Run | Initiates the event queue of a dispatcher. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
VerifyAccess | Determines whether the calling thread has access to the current dispatcher. |
Top
Events
Name | Description | |
---|---|---|
ShutdownFinished | Occurs when a dispatcher finishes shutting down. | |
ShutdownStarted | Occurs when a dispatcher begins the shutdown process. |
Top
Remarks
This class cannot be inherited.
When a Dispatcher object (a dispatcher) is created on a thread, it becomes the only dispatcher that can be associated with that thread, even if the program shuts down the Dispatcher object. If your program shuts down a Dispatcher object, that dispatcher cannot be restarted. If your program calls the BeginInvoke and Invoke methods on a Dispatcher object that has been shut down, an exception is thrown.
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.