Skip to content

Commit dd90c33

Browse files
committed
docs(snapshots): note the execution gate covers the single-process run
Clarify that EXECUTION_GATE coordinates threads within one `cargo test` process (the Linux/macOS jobs, where the parallel-PTY signal flakiness lives). The Windows job runs under `cargo nextest`, which isolates each trial in its own process, so the gate is a harmless no-op there and isolation comes from nextest's process-per-test model instead.
1 parent 596a9ab commit dd90c33

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • crates/vite_cli_snapshots/tests/cli_snapshots

crates/vite_cli_snapshots/tests/cli_snapshots/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,14 @@ fn run_case(
931931
/// else runs while they do. This replaces the old blanket `--test-threads=1`
932932
/// on Linux: only the few signal-sensitive cases pay for serialization, while
933933
/// the rest parallelize as they already do on macOS and Windows.
934+
///
935+
/// This coordinates threads within a single `cargo test` process, which is the
936+
/// Linux and macOS snapshot jobs and the only place the parallel-PTY
937+
/// signal-routing flakiness occurs. The Windows job runs the suite under
938+
/// `cargo nextest`, which executes each trial in its own process; there the
939+
/// gate is a no-op, but isolation is stronger for free — a signal-sensitive
940+
/// case already has its own process, PTY, and process group, which is exactly
941+
/// what this gate reconstructs for the shared-process case.
934942
static EXECUTION_GATE: std::sync::RwLock<()> = std::sync::RwLock::new(());
935943

936944
/// Held for a case's whole run: either a shared read lease (parallel) or the

0 commit comments

Comments
 (0)