The library documents itself · GUI & reactive
stzEventBus
13 own methods · 0 forms written with extensions, listed under their method
the source: base/reactive/stzEventBus.ring(opens in a new tab) · All classes · The area reference: GUI & reactive
Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean
No method of this class is run on this page: the class reaches files, the network, processes, the clock, chance or sound, and an example run here would only be an example of its effects. Each method carries the explanation the library gives of itself.
Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
Channel
stateless: the bus lives in the engine (process-global channels) Declare (idempotently) a channel. Returns This for chaining.no extension
HasChannel
(no comment in the source: the name reads as a sentence) has channelno extension
Subscribe
Subscribe to a channel (auto-declares it). Returns a subscriber id (>0) or a negative error.no extension
Unsubscribe
(no comment in the source: the name reads as a sentence) unsubscribeno extension
Emit
Emit a payload on a channel (auto-declares it). Returns how many subscribers it was delivered to.no extension
EventCount
It rises and never falls WHILE THE CHANNEL LIVES, which is not the same as monotonic, and the difference bites. DestroyChannel and ClearAll below put a channel back to zero, so a consumer holding a previous count sees a SMALLER number and, if it only tests for "bigger than last time", decides there is no new work -- for good. A DECREASE means the channel is new and the consumer must re-baseline; stzAgentHost.TickDue does exactly that.no extension
SubscriberCount
(no comment in the source: the name reads as a sentence) subscriber countno extension
LastEvent
The most recent payload emitted on the channel ("" if none).no extension
ChannelGeneration
EventCount alone cannot tell a consumer that a channel was remade: the count restarts at zero, and by the time anyone polls it may already have climbed back above the value they remembered, so "did the number go down" misses it. The generation never repeats and never resets, so comparing it is exact rather than a race. stzAgentHost.TickDue re-baselines on it.no extension
NumberOfChannels
(no comment in the source: the name reads as a sentence) number of channelsno extension
DestroyChannel
(no comment in the source: the name reads as a sentence) destroy channelno extension
ClearAll
Handy for test isolation, and worth saying plainly: the bus is PROCESS-GLOBAL, so this resets channels other parts of the same process are watching, and their event counts restart at zero. See EventCount.no extension

