MainThread
La référence est en anglais : elle est générée à partir des commentaires du code, écrits en anglais.
public static class MainThreadNamespace Flux.
The main thread of the world: the thread of the frames and of the events, the only one where the API that touches the world runs. Work done on another thread (a System.Threading.Thread, Task.Run, Parallel.For) comes back here with Post or await MainThread.Yield().
Properties
IsCurrent
public static bool IsCurrent { get; }True when the code runs on the main thread.
Methods
Post
public static void Post(Action action)Runs action on the main thread, with the work queued for the current or the next frame. Can be called from any thread. An exception that leaves the action is logged as unhandled.
Yield
public static MainThreadAwaitable Yield()await MainThread.Yield(): the rest of the async method runs on the main thread, with the work queued for the current or the next frame (also when it is awaited on the main thread).
