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
// =============================================================================
// vil_queue::traits — Queue Backend Trait
// =============================================================================
// Queue abstraction allowing swappable implementations without changing
// consumer code.
//
// TASK LIST:
// [x] QueueBackend trait definition
// [ ] TODO(future): QueueBackendSpsc — SPSC lock-free impl
// [ ] TODO(future): QueueBackendMpmc — MPMC bounded impl
// =============================================================================
use Descriptor;
/// Queue backend abstraction for descriptor transport.
///
/// Implementors must be thread-safe (Send + Sync) since queues are accessed
/// from different producer and consumer threads.
///
/// # Contract
/// - `push` must not panic (backpressure handled at a higher level)
/// - `try_pop` is non-blocking: returns None if queue is empty
/// - Ordering: FIFO (first-in, first-out)