1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! SPSC bench traits and bench cores.
//!
//! The trait is const-generic over `CAPACITY` so it matches how our own
//! SPSC exposes capacity (compile-time). Adapters over crates whose
//! capacity is runtime forward `CAPACITY` to their runtime constructor;
//! adapters over crates whose capacity is a type parameter forward it to
//! that parameter.
pub use ;
pub use ;
/// Producer half of an SPSC pair, as seen by the bench harness.
///
/// `try_push` is the only method the harness needs. `Ok(())` on success,
/// `Err(v)` if the queue is full (adapter must not block or spin
/// internally; the bench loops the spin externally so the wait cost is
/// visible in the recorded percentile).
/// Consumer half of an SPSC pair, as seen by the bench harness.
///
/// `try_pop` returns `Some(v)` on success, `None` if empty. Same
/// non-blocking contract as [`SpscProd::try_push`].
/// Tag type that constructs an SPSC pair with capacity `CAPACITY`.
///
/// Implementors are typically zero-sized markers (e.g. `OursSpsc<T, C>`,
/// `RtrbSpsc<T, C>`) that only exist to route generic instantiations
/// through [`new`](Self::new).