mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +02:00
sync: clarify panic behavior of broadcast::channel() (#8420)
Co-authored-by: philphauler <[email protected]>
This commit is contained in:
co-authored by
philphauler
parent
0069aef281
commit
7d0d729d8f
@@ -532,7 +532,7 @@ const MAX_RECEIVERS: usize = usize::MAX >> 2;
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This will panic if `capacity` is equal to `0`.
|
||||
/// This will panic if `capacity` is equal to `0` or exceeds `usize::MAX / 2`.
|
||||
///
|
||||
/// This pre-allocates space for `capacity` messages. Allocation failure may result in a panic or
|
||||
/// [an allocation error](std::alloc::handle_alloc_error).
|
||||
|
||||
Reference in New Issue
Block a user