Creates a bus with no subscribers yet, and a publisher on it.
Optionalcapacity: number | null
how many events a slow subscriber may fall behind before it starts missing them, rounded up to the next power of two and at most 1048576; 64 when not given.
Hands an event to every current subscriber: bytes, or text such as an event name.
It never waits.
How many subscribers the event was handed to; an event published while no one is subscribed is dropped, and this is 0.
Takes another publisher on the same bus, for another part that announces.
Subscribes to the bus, returning an endpoint that sees events published from now on.
A publish-only handle to an event bus.
It has no queue of its own, so a part that only announces never fills a buffer it does not read, and publishing from it returns how many subscribers the event was handed to.