pub(crate) fn await_start(
slot: &Mutex<Option<JoinHandle<()>>>,
inner: &Inner,
spawned: ThreadId,
what: &str,
) -> Result<(), Error>Expand description
Startup handshake shared by the capture and playback starts: waits up to ~2 s for the
worker this call spawned (spawned) to publish RUNNING or FAILED. A worker still
STARTING when the window closes counts as started — its retry ladder legitimately
runs longer than this — and a failure after that is exposed through state /
last_error instead. On FAILED, join_failed_start tears down only that thread
(identity-checked, sparing a concurrent winner) and the worker’s recorded error is
returned as Error::Start.