thweads

1.0.0 • Public • Published

Simple multithreading for Node.js

Installation

npm install --save thweads

Usage

const Thweads = require('thweads');
const thweads = new Thweads({ thweads: 4 });
//or Thweads() to automatically set thweads

thweads.addAction(async () => {
    const workerData = new Array(10000000).fill(1);
    workerData.reduce(async (sum, num) => sum + num, 0);
});

thweads.startActions();
© Copyright 2023 dubfib - MIT License

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    8
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    8

Package Sidebar

Install

npm i thweads

Weekly Downloads

8

Version

1.0.0

License

MIT

Unpacked Size

5.66 kB

Total Files

6

Last publish

Collaborators

  • dubfib