@shahidcodes/threadifier
Advanced tools
Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "@shahidcodes/threadifier", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "A wrapper around node worker_thread with easy promise based api.", | ||
@@ -49,2 +49,2 @@ "main": "index.js", | ||
} | ||
} | ||
} |
/* eslint-disable no-plusplus */ | ||
const { Worker } = require('worker_threads'); | ||
const log = require('debug')('threadifier:main'); | ||
const log = () => ''; | ||
class WorkerPool { | ||
@@ -29,3 +30,3 @@ constructor(numberOfThreads) { | ||
script: fn.toString(), | ||
args, | ||
args: { ...args, basePath: __dirname }, | ||
callback: (e, r) => { | ||
@@ -32,0 +33,0 @@ if (e) reject(e); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10484