We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68ca3df commit 98f9636Copy full SHA for 98f9636
src/mpmc.rs
@@ -577,4 +577,18 @@ mod tests {
577
// this should not block forever
578
assert_eq!(q.dequeue(), None);
579
}
580
+
581
+ #[test]
582
+ fn full_at_wrapped_pos0() {
583
+ let q = Q2::new();
584
+ for _ in 0..254 {
585
+ assert!(q.enqueue(0).is_ok());
586
+ assert_eq!(q.dequeue(), Some(0));
587
+ }
588
589
590
+ // this should not block forever
591
+ assert!(q.enqueue(0).is_err());
592
593
594
0 commit comments