pub fn install_spawner(spawner: Arc<dyn ProcessSpawner>) -> SpawnerGuardExpand description
Install a per-thread spawner used by spawn_process from this thread.
Returns a guard that restores the previous spawner on drop. Tests use
this to install a super::mock::MockSpawner; production never calls
it (the default real spawner runs whenever no per-thread spawner is
installed).
Thread-local rather than global so parallel test execution is safe. Process-tool spawns happen on the test’s thread; the long-running waiter threads operate on the handle that was already returned, so they don’t perform spawner lookups themselves.