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
//! Whether another pass of the fd-marker sweep runs.
//!
//! The decision reads the counts of the passes alone, never the OS, so it is the same on every
//! platform and tested on all of them.
/// What follows a pass.
pub
/// What follows pass number `pass` (from 1), which found `found` identities no earlier pass had
/// seen, when the pass before it found `previous`.
///
/// Pass 1 counts the tree as it stood; every later pass counts the identities no earlier pass had
/// seen (mostly forks made during the pass before it), so the two are not comparable. Pass 3
/// therefore always runs when pass 2 found something. From then on another pass runs only when the
/// pass found fewer new identities than the pass before it.
///
/// A fork is alive and can fork again before the next pass reaches it, and a member the sweep
/// leaves running (an EPERM-unkillable one, say) keeps forking for as long as it lives. "Found
/// something new" alone can therefore stay true forever, and a numeric cap is forbidden, so the
/// count must fall. A count that must fall cannot do so forever, but it cannot tell a long finite
/// fork chain from an endless one either: some finite trees stop early. The passes can number about
/// what pass 2 found, each a whole-host scan.
pub
/// Runs `pass` (given its number, from 1) until [`after_pass`] stops the sweep, and says whether it
/// stopped on a count that did not fall ([`Next::StillForking`]). `pass` returns how many
/// identities it found that no earlier pass had seen.
pub