[WTF Node?] open handles:
- Timers:
- (58570 ~ 58 s) (anonymous) @ file:///.../node_modules/p-queue/dist/index.js:283
- Intervals:
- (60000 ~ 60 s) (anonymous) @ file:///.../node_modules/p-queue/dist/index.js:322
dist/index.js:283
dist/index.js:322
First it hangs on dist/index.js:283
; and then, if you let it run for a while, on dist/index.js:322
as well.
My code is analogous to:
(async () => {
for (let i = 0;i < 4;i++) {
await Q.add(() => sth())
}
// await Q.onIdle()
// console.log("this is reached (ofc)")
})()
say
// initialized outside the async arrow (lexical scope)
// also hangs when this is
// initialized inside the async arrow ('async context')
const Q = new PQueue({
concurrency: 100,
intervalCap: 500,
interval: 60 * 1000
})
$ nvm current
v16.15.0
$ lsb_release -d
Description: Pop!_OS 20.04 LTS
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too