process_runner
4.2.4, released a year ago by an unverified publisher
Dart process invocation abstraction that manages multi-process queues.
What it does
The package provides a Dart-idiomatic API for spawning external OS processes and managing their standard output and error streams without losing data. It also allows creating a worker pool to run multiple processes concurrently with a set number of active jobs.
AI-written summary of version 4.2.4, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to run external OS processes in Dart or Flutter with proper stdout and stderr capture.
- You want to manage a queue or pool of worker processes with limited concurrency.
Skip it when
- You are building web applications since external OS processes are not supported in the browser environment.
Strengths
- Properly manages stderr and stdout streams so output is not lost without needing to wait on streams.
- Supports worker process pools with configurable job concurrency and dependency ordering.
- Allows supplying a mocked ProcessManager for easier unit testing.
Weaknesses
- Limited to environments that support spawning external processes (not supported on the web).
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 8
none
import 'package:process_runner/process_runner.dart';
Future<void> main() async {
ProcessRunner processRunner = ProcessRunner();
ProcessRunnerResult result = await processRunner.runProcess(['ls']);
print('stdout: ${result.stdout}');
print('stderr: ${result.stderr}');
}Works with
Packages commonly used together with process_runner: ones it builds on, ones built on it, and its own family.
- platformprocess_runner depends on itCross‑platform abstraction for querying runtime platform info in Dart.
- asyncprocess_runner depends on itUtility classes and helpers that extend Dart's async library.
- processprocess_runner depends on itPluggable, mockable process invocation abstraction for Dart.
- testprocess_runner depends on itA full featured library for writing and running Dart tests across platforms.
- argsprocess_runner depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- fileprocess_runner depends on itPluggable, mockable file system abstraction for Dart with in-memory support.