What holds a slot, or waits in line for one: its process, what it is (`tcm test of <dir>`), since when, and its own token (a process holding several slots tells them apart).
Whether this process runs inside a slot another holds for it (TCM_SUITE_SLOT, which `runSuite` sets for a suite, and withSlot's `env` for what it starts): what it runs takes no more of them, and runs one at a time.
How many slots the machine has: how much work (a suite, a Vitest project of test definitions, checking, a build) every tcm on it runs at once, together. TCM_SLOTS (or TCM_SUITE_SLOTS, its name before), or defaultSlots for this machine.
Slots shared by every process using `dir`: `size` files there (`slot-<i>`), each held by the process that made it (its pid in it), and a line of those waiting (`line-<time>-…`), served first come first served. A slot or a place in line whose process is gone is nobody's: taken over by the next to look. What a process holds is given back when it exits, too.
Says a run's waits for slots, quietly: once when it starts waiting (with what sets how many there are), again only when who holds them changes or how many are ahead of it changes much (a minute after the last at the soonest), or after five minutes of the same, and how long it waited once it has them. Its takes waiting at once (a worker each) are one wait. Other work is named by its kind and branch (`tcm test`s by branch alone), with its codebase if it's another and its pid if two have the same name; this one's own slots are "this run".
Where the machine's slots are: TCM_SLOTS_DIR, or a directory of the user's in the temporary directory (`tcm-suite-slots-<uid>`, named when only suites took them), the same for every tcm they run.
Run `work` in a slot of the machine's: one taken for it (as `what`: `<kind> of <root> on <branch>`), waiting its turn with every other tcm's work, and given back when it ends. Work that's already in one runs at once, taking no more: inside a suite's slot (inSuiteSlot), or inside another `withSlot`'s work in this process (so nested work never waits behind itself). What the work starts as a process of its own runs in its slot too when started with `env` (TCM_SUITE_SLOT). A wait is said by `say` (stderr's, unless given), as slotWaits says it. `pool` is the machine's (slotPool in slotsDir, machineSlots of them) unless given.
A line slotWaits says (or a tcm from before it: `waiting for a suite slot: …`), as a run's output has it.
defaultSlots(cpus: number, performance: number, memory: number) => number
How many slots a machine with `cpus` logical cores, `performance` of them performance cores (on a chip with two kinds; else all are) and `memory` bytes has. What takes one (a suite: tcm, the TypeScript checker, Vite, a browser; checking; a build) keeps about a core busy as it goes, so a slot for each performance core and one for every three efficiency cores, and 2 GB of memory each; never fewer than 2.