Run promise-returning and async functions concurrently with configurable concurrency limits.
p-all is a JavaScript library that runs multiple promise-returning or async functions concurrently while allowing you to limit how many run at the same time. It solves the problem of uncontrolled parallel execution that can overwhelm system resources, providing a safer alternative to `Promise.all()` when dealing with many asynchronous tasks.
JavaScript and Node.js developers who need to manage concurrent asynchronous operations, such as API calls, file processing, or database queries, with controlled parallelism.
Developers choose p-all for its simplicity and focused functionality—it offers precise concurrency control, error handling options, and abort support without the overhead of more complex queue systems, making it ideal for straightforward concurrent task management.
Run promise-returning & async functions concurrently with optional limited concurrency
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows setting a specific limit on concurrently pending promises, preventing system overload as highlighted in the concurrency option with a default of Infinity and minimum of 1.
Offers configurable stop-on-error behavior, enabling either immediate failure or aggregation of all errors into an AggregateError for batch processing scenarios.
Integrates with AbortSignal for cancellation, providing a built-in way to halt ongoing operations mid-execution using AbortController.
Returns fulfilled values in the same order as the input functions, ensuring predictable results similar to Promise.all(), as stated in the key features.
Lacks automatic retry capabilities for failed promises, requiring manual implementation for resilience, unlike some more feature-rich concurrency libraries.
Requires passing functions that return promises instead of accepting promises directly, adding boilerplate when dealing with pre-existing promises.
Processes tasks from a fixed iterable upfront; cannot dynamically add tasks after execution begins, limiting flexibility for streaming or reactive workflows.