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
61
62
63
//! gatling — the constellation's **ONE** shared no-barrier worker-pool engine.
//!
//! Extracted into its own leaf crate so every codec (`lgz`, `ljar`, `lbzip2`,
//! `lzip-parallel`, …) *and* the `znippy-zoomies` root crate can depend on the
//! same engine without a dependency cycle: this crate depends on no codec, so
//! there is no cycle and no reason for any codec to hand-roll a private thread
//! pool (the sin the rayon-free law forbids).
//!
//! - [`gatling`]: generic no-barrier worker-pool engine (split → N decode →
//! in-order collect → sink), parameterised by a [`gatling::Codec`] + a
//! [`gatling::Sink`]. Its [`gatling::io`] submodule is the **async** sibling —
//! a no-barrier, bounded, ordered async task pool for I/O-bound fan-out; its
//! [`gatling::ordered`] submodule is the item-oriented ordered-sink variant.
//! - [`gatling_forkjoin`]: the fork-join gatling — `gatling_for_each` /
//! `gatling_for_each_balanced` / `gatling_run`: all `n` units are known now,
//! so N workers drain a shared atomic cursor at full tilt (no reader thread).
//! - [`background`]: the depth-1 gatling — a single background [`background::Job`]
//! for producer/consumer *overlap* (double-buffering a spill/sort/write stage
//! behind the next decode pass). The sanctioned home for the one background
//! `thread::spawn` non-engine crates would otherwise hand-roll.
//! - [`gatling::revolver`]: zero-allocation slot pool for 1-reader / N-worker
//! streaming — the buffer substrate the streaming engine fans over. Folded in
//! as a `gatling` submodule (was the top-level `chunk_revolver` module); still
//! re-exported crate-root as [`chunk_revolver`] for API compatibility.
//!
//! `znippy-zoomies` re-exports these modules unchanged (`pub use gatling::…`) so
//! external consumers' `znippy_zoomies::gatling` / `::gatling_forkjoin` /
//! `::chunk_revolver` paths keep working.
/// **Introspection / emit marker** — record one functional-status row for the
/// nornir test matrix. Wraps `nornir_testmatrix::functional_status` behind the
/// `testmatrix` feature (a compiled-out `#[inline]` no-op otherwise, with no
/// nornir dep in the default build). `component` is the reporting surface (e.g.
/// `"gatling_forkjoin"`), `check` what it verified, `ok` the verdict, `detail` a
/// short human note. The gatling engines call this so `nornir test --features
/// testmatrix` SEES each gatling run.
/// Backwards-compatible alias for the slot pool, now folded in as
/// [`gatling::revolver`]. Preserves the historical `gatling::chunk_revolver`
/// (and, through the znippy-zoomies re-export, `znippy_zoomies::chunk_revolver`)
/// path for external consumers.
pub use craterevolver as chunk_revolver;
/// Parallel-writer gatling — the shared extract/decode/**write** fan-out that
/// removes the single ordered writer from the critical path (independent files,
/// or independent regions of one pre-sized stream). Unix-only: it uses
/// positional `pread`/`pwrite` (`std::os::unix::fs::FileExt`) so N workers read
/// and write disjoint regions concurrently with no shared file offset.