Expand description
Async child-process primitives.
Two backends, selected the same way as crate::io/crate::fs:
native(default): synchronous spawn (matchestokio::process’s own choice),wait/stdio I/O dispatched to a dedicated blocking- thread pool, completion signaled viacrate::lockfree::OnceSlot— noMutex-guarded completion state. Child handles are never shared:wait/wait_with_outputconsumeselfoutright, and stdio handles are exclusively owned by whoever holds them. Seenative’s module doc for the full rationale.tokio(whennativeis off): a thin wrapper overtokio::process.
Structs§
- Blocking
Op - A single blocking operation dispatched to the process thread pool,
completed via a wait-free
OnceSlotrather than aMutex-guarded flag. - Dtact
Child - A spawned child process.
- Dtact
Child Stderr - One end of a child process’s stderr pipe.
- Dtact
Child Stdin - One end of a child process’s stdin pipe.
- Dtact
Child Stdout - One end of a child process’s stdout pipe.
- Dtact
Command - Async-friendly wrapper over
std::process::Command. Builder methods mirrorstd::process::Command’s own naming.
Functions§
- init
- Start the process thread pool with the given number of worker threads. Idempotent — later calls are no-ops once initialized.
- init_
process - Full-signature entry point matching the other native backends’ call.