Function sync_channel::new_channel_with
source · pub fn new_channel_with<T: Send, P: DeadlockPrevention>(
minimum_capacity: usize
) -> (Sender<T, P>, Receiver<T, P>)
Expand description
Creates a new blocking channel with the specified deadlock prevention method.
See new_channel()
for more details.
The blocking channel uses a wait queue internally and hence exposes a
deadlock prevention type parameter P
that is [Spin
] by default.
See [WaitQueue
]’s documentation for more info on setting this type parameter.