andywer / andywer/threads.js

Cannot terminate pool when there is an init timeout

Ouverte
#396 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
question
Langage dominant
TypeScript
Étoiles
3.5k
Forks
173
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

I'm testing my error handling code. I forced a timeout of 100ms in spawn, which causes the expected error. Inside the try/finally, I call `.terminate(true)`. With the debugger paused on the line that calls terminate, I see:

![Screenshot 2021-09-16 at 17 54 48](https://user-images.githubusercontent.com/602423/133706900-036ee31e-7cae-47de-85c9-abd016da4514.png)

which is expected. Then I let the program complete, and I'm left with a hung debugger and the workers still alive:

![Screenshot 2021-09-16 at 17 55 03](https://user-images.githubusercontent.com/602423/133706970-49729c95-d89c-4657-b7ef-ab66e9e89e0f.png)

I should note that this terminate logic works normally if the error is not an init timeout.

What are your thoughts on this?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.