andywer / andywer/threads.js

Cannot terminate pool when there is an init timeout

未關閉
#396 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
question
主要語言
TypeScript
星號
3.5k
分支
173
PR 合併指標
30 天內沒有已合併 PR

描述

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?

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。