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
64
65
66
67
68
69
70
71
//! Bounded CPU parallelism for the naturally independent ingest work
//! (Phase 15.4).
//!
//! The pool is compiled **only** with the non-default `parallel` feature (which
//! implies `field`). Without that feature [`WorkerPool`] is a zero-sized marker
//! that is never constructed, and every ingest site takes its serial path; the
//! exact core therefore keeps no new dependency and no behavior change.
//!
//! ## The one architectural rule
//!
//! A worker may only run a **pure** map over immutable inputs. It must never
//! touch a [`FieldStore`](crate::field::FieldStore), its `Rc`-based
//! [`IoCounters`](crate::store::IoCounters), a derived-cache memo, or the disk.
//! The store's single-threaded accounting is the fuse that keeps parallelism
//! honest: the parallel phase computes owned canonical bytes and [`NodeId`]s,
//! and a *serial* fold merges them in physical order.
//!
//! Determinism is therefore structural, not a tuning property. Indexed
//! `par_iter().collect()` preserves physical order, and every order-dependent
//! gate (the running `MAX_TOTAL_DECODED` / `MAX_OBJSTM*` caps, the existence
//! probes and counters) is replayed in that same serial fold — so the parallel
//! path yields byte-identical nodes, ids, index entries, and limits enforcement
//! to the serial path.
//!
//! [`NodeId`]: crate::store::NodeId
use crate;
/// A bounded worker pool. `workers == 1` is a valid (serial) pool, though the
/// ingest sites take their serial branch directly rather than paying to build it.
/// Without the `parallel` feature this is a zero-sized marker that is never
/// constructed; the ingest sites keep their serial path (`pool` is always `None`).
;