Skip to main content

Module process

Module process 

Source
Expand description

Async child-process primitives.

Two backends, selected the same way as crate::io/crate::fs:

  • native (default): synchronous spawn (matches tokio::process’s own choice), wait/stdio I/O dispatched to a dedicated blocking- thread pool, completion signaled via crate::lockfree::OnceSlot — no Mutex-guarded completion state. Child handles are never shared: wait/wait_with_output consume self outright, and stdio handles are exclusively owned by whoever holds them. See native’s module doc for the full rationale.
  • tokio (when native is off): a thin wrapper over tokio::process.

Structs§

BlockingOp
A single blocking operation dispatched to the process thread pool, completed via a wait-free OnceSlot rather than a Mutex-guarded flag.
DtactChild
A spawned child process.
DtactChildStderr
One end of a child process’s stderr pipe.
DtactChildStdin
One end of a child process’s stdin pipe.
DtactChildStdout
One end of a child process’s stdout pipe.
DtactCommand
Async-friendly wrapper over std::process::Command. Builder methods mirror std::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.