#include <nxt/signal.hpp>
template <typename T>
signal_state struct
Internal shared state of a signal.
Single-slot delivery semantics: at most one awaiter is registered at any time. A new next() while a previous awaiter is pending will overwrite the slot and resume the previous awaiter with nullopt. A push() with no waiter drops the value.
next(stop_token) additionally unregisters the pending awaiter on cancellation, which lets structured races cancel losing branches before they can consume later values.
Public types
- struct pending_slot