g4lb / promise-pool

Promise Pool with Queue Data Structure

Home Page:https://medium.com/@ga1/mastering-promise-pool-in-typescript-efficient-asynchronous-operations-739b2f403d1f

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Promise Pool

A Promise Pool is a utility that manages a pool of promises in TypeScript, allowing for controlled concurrency when executing asynchronous tasks. This README provides an overview of the Promise Pool implementation using a queue data structure and provides usage instructions.

Installation

To use the Promise Pool with a queue data structure in your TypeScript project, you can install it via npm or yarn:

npm install 

Example

Here's an example that demonstrates the usage of Promise Pool with a queue data structure, the example limiting the number of concurrent Promises being executed at a given time (currently its 100)

npm start