"dev": true
},
"@types/node": {
- "version": "14.14.30",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.30.tgz",
- "integrity": "sha512-gUWhy8s45fQp4PqqKecsnOkdW0kt1IaKjgOIR3HPokkzTmQj9ji2wWFID5THu1MKrtO+d4s2lVrlEhXUsPXSvg==",
+ "version": "14.14.31",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz",
+ "integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==",
"dev": true
},
"@types/offscreencanvas": {
}
},
"poolifier": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/poolifier/-/poolifier-1.2.1.tgz",
- "integrity": "sha512-kUH3JlLLO7JdAnRdtbgaSME5WDxgDzAuUk9+hapVHfXeI0VjpeuLnxLL8cUF7lEgrUE4m59scr5TFx5ajbPqXQ=="
+ "version": "2.0.0-beta.6",
+ "resolved": "https://registry.npmjs.org/poolifier/-/poolifier-2.0.0-beta.6.tgz",
+ "integrity": "sha512-n+IumaVITBY1/UD4gC4e6uXHlBIgy2+AKeX4BmhEP4phIM6DCYBYBRuVk5lk8LlXKiO8HFrQ3WXHzCpubqWyqA=="
},
"postcss": {
"version": "8.1.10",
},
"dependencies": {
"mongodb": "^3.6.4",
- "poolifier": "^1.2.1",
+ "poolifier": "^2.0.0-beta.6",
"source-map-support": "^0.5.19",
"tslib": "^2.1.0",
"uuid": "^8.3.2",
"utf-8-validate": "^5.0.4"
},
"devDependencies": {
- "@types/node": "^14.14.30",
+ "@types/node": "^14.14.31",
"@types/uuid": "^8.3.0",
"@types/ws": "^7.4.0",
"@typescript-eslint/eslint-plugin": "^4.15.1",
-import { DynamicThreadPool, DynamicThreadPoolOptions } from 'poolifier';
+import { DynamicThreadPool, PoolOptions } from 'poolifier';
import Constants from '../utils/Constants';
import Utils from '../utils/Utils';
+import { Worker } from 'worker_threads';
import { WorkerData } from '../types/Worker';
import Wrk from './Wrk';
class DynamicPool extends DynamicThreadPool<WorkerData> {
private static instance: DynamicPool;
- private constructor(min: number, max: number, filename: string, opts?: DynamicThreadPoolOptions) {
+ private constructor(min: number, max: number, filename: string, opts?: PoolOptions<Worker>) {
super(min, max, filename, opts);
}
-import { FixedThreadPool, FixedThreadPoolOptions } from 'poolifier';
+import { FixedThreadPool, PoolOptions } from 'poolifier';
import Constants from '../utils/Constants';
import Utils from '../utils/Utils';
+import { Worker } from 'worker_threads';
import { WorkerData } from '../types/Worker';
import Wrk from './Wrk';
class StaticPool extends FixedThreadPool<WorkerData> {
private static instance: StaticPool;
- private constructor(numThreads: number, workerScript: string, opts?: FixedThreadPoolOptions) {
+ private constructor(numThreads: number, workerScript: string, opts?: PoolOptions<Worker>) {
super(numThreads, workerScript, opts);
}