Skip to content

Easily parallelize tasks using workers both in the browser and in Node.js

Notifications You must be signed in to change notification settings

cheminfo/parallel-workers-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

parallel-workers-manager

NPM version build status Test coverage npm download

Some tasks can easily be split

Installation

$ npm i parallel-workers-manager

Usage

import { ParallelWorkersManager } from 'parallel-workers-manager';

const manager = new ParallelWorkersManager(
  (value) => {
    return value;
  },
  {
    maxWorkers: 1,
  },
);

const promises = [manager.post('abc'), manager.post('def')];
const results = await Promise.all(promises);
expect(results).toEqual(['abc', 'def']);

License

MIT

About

Easily parallelize tasks using workers both in the browser and in Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published