Indicates whether the broadcast channel is closed.
Closes the broadcast channel.
Sends a message to all subscribers.
The message to send.
Optionalsignal: AbortSignal | nullAn optional AbortSignal to cancel the send operation.
A promise that resolves when the message has been sent to all subscribers.
Subscribe to the broadcast channel.
A new subscriber to the broadcast channel.
A broadcast channel that allows multiple subscribers to receive messages.
Each subscriber maintains its own message queue with a specified capacity. If a subscriber's queue is full when a new message is sent, the oldest message in that subscriber's queue is discarded to make room for the new message.
Example