0.0.1 • Published 2 years ago

synca v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

synca

Usage

with Deno

import { concurrent } from "https://deno.land/x/synca/mod.ts";

const co = concurrent(4 /* concurrency */);

for (let i = 0; i < 100; i++) {
  await co.run(async () => {
    await fetch(`https://something/articles/${i}`);
  });
}

await co.wait(); // remain works..

with Node.js & Browser

Install

npm install synca
import { concurrent } from "synca";

// Usage is as above :-)

Related