Skip to main content

Module threading

Module threading 

Source
Expand description

System.Threading: the cancellation of work, and tasks (tasks).

Modules§

tasks
System.Threading.Tasks: tasks, their completion sources, and the running of futures on the thread that started them (docs/porting/reactive.md, section 5.8).

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.
LocalCancellationTokenRegistration
A callback registered with CancellationToken::register_local; it belongs to the thread that registered it.

Traits§

SynchronizationContext
Where posted work runs (System.Threading.SynchronizationContext).

Functions§

current_synchronization_context
The current context of the calling thread (SynchronizationContext.Current).
set_synchronization_context
Sets the current context of the calling thread (SynchronizationContext.SetSynchronizationContext), and makes it the thread poster of the thread, through which other threads wake its tasks and run its cancellations; None clears both.