IBroadcastSubscriber
Defined in: packages/async/src/synchro/broadcast.ts:30
A subscriber to a Broadcast channel.
Type Parameters
Section titled “Type Parameters”T extends DefinedValue
Properties
Section titled “Properties”closed
Section titled “closed”
readonlyclosed:boolean
Defined in: packages/async/src/synchro/broadcast.ts:36
Indicates whether the subscriber is closed.
Returns
Section titled “Returns”True if the subscriber is closed, false otherwise.
Methods
Section titled “Methods”close()
Section titled “close()”close():
void
Defined in: packages/async/src/synchro/broadcast.ts:44
Closes the subscriber.
This will prevent further messages from being received. Any pending receive operations will be aborted.
Returns
Section titled “Returns”void
receive()
Section titled “receive()”receive(
signal?):Promise<T>
Defined in: packages/async/src/synchro/broadcast.ts:53
Wait to receive a message from the broadcast channel.
Parameters
Section titled “Parameters”signal?
Section titled “signal?”AbortSignal | null
An optional AbortSignal to cancel the receive operation.
Returns
Section titled “Returns”Promise<T>
Throws
Section titled “Throws”If the subscriber has lagged behind and missed messages.