Skip to main content

Module threading

Module threading 

Source
Expand description

The dispatcher: the per-thread work queue that everything UI-related runs on, and the one place where other threads can hand work to a UI thread.

Structs§

CancellationToken
Propagates notification that operations should be canceled.
CancellationTokenRegistration
A callback registered with a CancellationToken.
CancellationTokenSource
Signals to one or more CancellationTokens that they should be canceled.
Dispatcher
Provides services for managing work items on a thread.
DispatcherFrame
Represents an execution loop in the Dispatcher.
DispatcherImplEvent
A multicast callback list used for the events exposed by dispatcher platform implementations. Like the implementations themselves it belongs to the loop thread.
DispatcherOperation
Represents an object used to interact with a job that has been posted to the Dispatcher queue.
DispatcherOptions
Options for the dispatcher, registered with the service locator.
DispatcherPriority
Defines the priorities with which jobs can be invoked on a Dispatcher.
DispatcherPriorityAwaitable
A future that completes after the dispatcher has processed a job at the requested priority, which resumes the awaiting code from the dispatcher thread. Created by Dispatcher::resume and Dispatcher::yield_now.
DispatcherPriorityOutOfRangeError
The error returned when converting an out-of-range number to a DispatcherPriority.
DispatcherPriorityTaskAwaitable
A future that awaits another future and then resumes the awaiting code from a dispatcher job of the requested priority, yielding the inner future’s output. Created by Dispatcher::await_with_priority.
DispatcherProcessingDisabled
Re-enables dispatcher processing when disposed; see Dispatcher::disable_processing.
DispatcherTask
The outcome of a future running on a Dispatcher; what the reference implementation returns as a task object.
DispatcherTaskScheduler
Runs futures on a Dispatcher at a fixed priority: every poll of a future started here is a dispatcher job of that priority.
DispatcherTimer
A timer that is integrated into the Dispatcher queues, and will be processed after a given amount of time at a specified priority.
DispatcherUnhandledExceptionEventArgs
Provides data for the Dispatcher::unhandled_exception event.
DispatcherUnhandledExceptionFilterEventArgs
Provides data for the Dispatcher::unhandled_exception_filter event.
FerroSynchronizationContext
A dispatcher together with the priority at which work handed to it is queued.
OperationCanceledError
The error produced when the result of an aborted operation is requested.
RestoreContext
Restores the previous current context; see FerroSynchronizationContext::ensure.
ThreadSafeObjectPool
A pool of reusable objects that can be shared between threads.

Enums§

DispatcherInvokeError
The error of a synchronous invoke with a timeout.
DispatcherOperationStatus
The state of a DispatcherOperation.

Traits§

DispatcherEventArgs
Base contract for all event arguments associated with a Dispatcher.
IControlledDispatcherImpl
IDispatcher
Dispatches jobs to a thread.
IDispatcherImpl
The platform side of a Dispatcher.
IDispatcherImplWithExplicitBackgroundProcessing
IDispatcherImplWithPendingInput
IDispatcherSignal
The one part of a dispatcher platform implementation that is used from other threads: waking the loop thread up.
IPlatformThreadingSignal
The one part of an IPlatformThreadingInterface that is used from other threads: waking the loop thread up.

Type Aliases§

DispatcherException
The payload of a panic raised by a dispatcher callback. This is what the reference implementation models as the exception object.
DispatcherUnhandledExceptionEventHandler
Handler of Dispatcher::unhandled_exception.
DispatcherUnhandledExceptionFilterEventHandler
Handler of Dispatcher::unhandled_exception_filter.