Skip to content

Commit

Permalink
sync: document that broadcast capacity is a lower bound (#6042)
Browse files Browse the repository at this point in the history
  • Loading branch information
Darksonn authored Oct 3, 2023
1 parent 310adf7 commit eaba971
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tokio/src/sync/broadcast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ const MAX_RECEIVERS: usize = usize::MAX >> 2;
/// Create a bounded, multi-producer, multi-consumer channel where each sent
/// value is broadcasted to all active receivers.
///
/// **Note:** The actual capacity may be greater than the provided `capacity`.
///
/// All data sent on [`Sender`] will become available on every active
/// [`Receiver`] in the same order as it was sent.
///
Expand Down Expand Up @@ -474,7 +476,7 @@ unsafe impl<T: Send> Sync for Receiver<T> {}
impl<T> Sender<T> {
/// Creates the sending-half of the [`broadcast`] channel.
///
/// See documentation of [`broadcast::channel`] for errors when calling this function.
/// See the documentation of [`broadcast::channel`] for more information on this method.
///
/// [`broadcast`]: crate::sync::broadcast
/// [`broadcast::channel`]: crate::sync::broadcast
Expand Down

0 comments on commit eaba971

Please sign in to comment.