mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-28 00:00:11 +02:00
sync: bounded channel can not have 0 size (#879)
This commit is contained in:
committed by
Carl Lerche
parent
e1a07ce50c
commit
95b0eec8af
@@ -65,6 +65,12 @@ fn send_recv_with_buffer() {
|
||||
assert!(val.is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn buffer_gteq_one() {
|
||||
mpsc::channel::<i32>(0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn send_recv_unbounded() {
|
||||
let (mut tx, mut rx) = mpsc::unbounded_channel::<i32>();
|
||||
|
||||
Reference in New Issue
Block a user