-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
Run the code multiple times, the program will occasionally get stuck in require().
Operating environment:
node version: v10.16.3
node-worker-threads-pool: 1.4.3
sync-request: 6.1.0
'use strict';
const { StaticPool } = require("node-worker-threads-pool");
async function task(i) {
require('sync-request'); // Problem code causes the program to occasionally get stuck
console.log(i);
return
}
async function taskStaticPool() {
const pool = new StaticPool({
size: 5,
task: task,
});
var execArr = [];
for (let j = 0; j < 100; j++) {
execArr.push(pool.exec(j));
}
await Promise.all(execArr);
pool.destroy();
}
taskStaticPool()Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels