Background-Tasks
Queue background tasks for NodeJS on another thread!
Requires NodeJS V12.5 or higher!
Installation
- NPM:
npm i -s background-tasks
- Yarn:
yarn add background-tasks
Example
const BackgroundTasks = require("background-tasks");
let threadManager = new BackgroundTasks();
threadManager.executeNow(() => {
// Do stuff on another thread!
});
For a compleat example, look here!