execution 1.0.1
Portable task execution, timers, and process lifecycle
Loading...
Searching...
No Matches
main_executor

Main-thread / UI-thread executor (Qt, libdispatch, Emscripten, etc.). More...

Functions

void stlab::main_executor_run ()
 Keeps the main queue serviced; never returns.

Variables

constexpr auto stlab::main_executor
 Runs void() noexcept tasks on the configured main queue in submission order, except that cooperative retirement prioritizes main work posted by draining producers. Remains available after pre_exit() so a final queued task can terminate the process.

Detailed Description

Main-thread / UI-thread executor (Qt, libdispatch, Emscripten, etc.).

Function Documentation

◆ main_executor_run()

void stlab::main_executor_run ( )
inline

Keeps the main queue serviced; never returns.

  • Precondition: called at most once per process, from the thread the platform designates as main where it designates one on native platforms.
  • Postcondition: on Emscripten, the runtime remains live until code calls emscripten_force_exit() from outside a noexcept executor task.