andywer / andywer/threads.js

completed promise does not resolve after terminate

Open
#316 11 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
3.5k
Forks
173
PR merge metrics
No merged PRs in 30d

Description

My code is waiting for the completed promise, eg `await this.pool.completed()` but after using `await this.pool.terminate(true)`, the completed promise still waits.
Is that intended? Shouldn't it either throw or resolve?

I can work around it with a second promise and using `Promise.any()` but that seems unintuitive.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.