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
56
57
58
59
60
[]
= "subms-mpsc-queue"
= "0.5.2"
= "2024"
= "1.85"
= ["Kieran Smith <oss@submillisecond.com>"]
= "submillisecond.com cookbook recipe - concurrency: subms-mpsc-queue. Vyukov-style multi-producer single-consumer linked queue with dangling-tail handling."
= "MIT OR Apache-2.0"
= "README.md"
= "https://submillisecond.com/cookbook/recipes/subms-mpsc-queue"
= ["mpsc", "queue", "lock-free", "vyukov", "subms"]
= ["concurrency", "data-structures"]
[]
= "subms_mpsc_queue"
= "src/lib.rs"
[[]]
= "perf_main"
= ["harness"]
[[]]
= "perf_features"
= ["harness", "mpmc", "bounded", "batch", "metrics"]
[]
= []
= ["dep:subms"]
# ----- Opt-in feature catalog (subms 0.5+) -----
# Each feature lives in src/features/<name>.rs behind a #[cfg(feature)]
# gate. Base queue is std-only, single-consumer, unbounded. Pick what
# you need:
#
# subms-mpsc-queue = { version = "0.5", features = ["bounded"] }
# subms-mpsc-queue = { version = "0.5", features = ["mpmc", "metrics"] }
#
# `mpmc` - MpmcQueue: Disruptor-style bounded ring with tail-sequence
# CAS. Consumers race for the tail; loser retries. Pairs
# with `metrics` to count CAS retries.
# `bounded` - BoundedMpscQueue: fixed-capacity variant; producers see
# backpressure via `try_enqueue` returning the rejected
# value when full. Base stays unbounded.
# `batch` - BatchMpscQueue: `try_dequeue_batch(&mut [T])` drains up
# to N items in one fenced pass. One acquire-fence per
# batch instead of one per item.
# `metrics` - MetricsMpscQueue: per-instance atomic counters for
# enqueue success/fail, dequeue success/fail, batch sizes
# drained, CAS retries (mpmc).
# `affinity` - Pin a queue's producer/consumer threads to specific
# cores via OS calls (Linux: sched_setaffinity; Windows:
# SetThreadAffinityMask; macOS/other: documented no-op).
= []
= []
= []
= []
= []
[]
= { = "0.5.2", = "../../../../subms/rust", = true }