std1.0.0-beta-7 SafeC docs

std :: reactive::signal

Struct std::SignalSub

#include <std/reactive/signal.h> source

struct SignalSub {
    fn void(?&Erased) listener;
    ?&Erased userdata;
}

One subscriber. Listeners on the same signal carry unrelated context types, so each is stored type-erased; signal_subscribe() only ever pairs a fn void(?&U) with a ?&U, so the erased call is always well-typed (see std/erased.h).

Fields

§fn void(?&Erased) listenersource

the fn void(?&U)

§?&Erased userdatasource

the ?&U