limit-parallel

    1.0.1 • Public • Published

    limit-parallel

    Installation

    npm install limit-parallel

    Usage

    const LimitParallel=require('limit-parallel');
    const limiter=new LimitParallel(10); //allows only 10 parallel tasks
    for (let i=0;i<15;i++) {
        await limiter.add(someFunctionThatReturnsAPromiseButResultsAreNotNeeded());
    }
    await limiter.finish(); //wait until all limiter functions are complete

    Keywords

    none

    Install

    npm i limit-parallel

    DownloadsWeekly Downloads

    5

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    14.6 kB

    Total Files

    9

    Last publish

    Collaborators

    • mctrivia