Skip to content

Commit 9f4f0c1

Browse files
committed
wip
1 parent 2a94555 commit 9f4f0c1

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

.github/workflows/ci.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ on:
1313
- cron: '0 1 * * *'
1414

1515
env:
16-
RUSTFLAGS: -Dwarnings
16+
CARGO_INCREMENTAL: 0
17+
CARGO_NET_RETRY: 10
1718
RUST_BACKTRACE: 1
19+
RUSTFLAGS: -D warnings
20+
RUSTUP_MAX_RETRIES: 10
1821

1922
defaults:
2023
run:

.github/workflows/release.yml

-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ on:
99
- crossbeam-[0-9]+.*
1010
- crossbeam-[a-z]+-[0-9]+.*
1111

12-
env:
13-
RUSTFLAGS: -Dwarnings
14-
RUST_BACKTRACE: 1
15-
1612
defaults:
1713
run:
1814
shell: bash

crossbeam-channel/tests/list.rs

+25
Original file line numberDiff line numberDiff line change
@@ -558,3 +558,28 @@ fn channel_through_channel() {
558558
})
559559
.unwrap();
560560
}
561+
562+
#[test]
563+
fn overflow() {
564+
let max = u32::max_value() as usize;
565+
let (s, r) = unbounded::<()>();
566+
for i in 0..max {
567+
assert_eq!(s.len(), i);
568+
s.send(()).unwrap();
569+
}
570+
assert_eq!(s.len(), max);
571+
s.send(()).unwrap();
572+
drop(r);
573+
// for _ in 0..max {
574+
// r.recv().unwrap();
575+
// }
576+
// assert_eq!(
577+
// r.try_recv().unwrap_err(),
578+
// crossbeam_channel::TryRecvError::Empty
579+
// );
580+
// drop(s);
581+
// assert_eq!(
582+
// r.try_recv().unwrap_err(),
583+
// crossbeam_channel::TryRecvError::Disconnected
584+
// );
585+
}

0 commit comments

Comments
 (0)