Closed radnotiz closed 4 years ago
Thank you for a beautiful issue and pull request.
I know I pulled out the onExit
to be after the Promise.all
for some reason, and I should know better when dealing with race conditions and thread/process handling.
I think I may have stuffed up the pull request history by doing a force push.
The master branch looks fine though.
Thank you for a beautiful issue and pull request.
I know I pulled out the
onExit
to be after thePromise.all
for some reason, and I should know better when dealing with race conditions and thread/process handling.
Thanks for the lightning fast release! I will keep an eye on this just in case it turns out to be problematic. Cheers
Now that I think about it, it was probably because I was still getting heisenbug behaviour and I thought doing it after would fix it.
Apply my usual non-JavaScript thinking to the problem I see I should have setup all my listener/event handling prior to doing anything that would progress the process forward so there is no possibility of dropping an event.
Which is why I moved the onExit
to where it is.
It really should have been in the 3rd item in the array and not the 1st so I didn't have to add that junk destructuring field. I'll fix that up later.
Closes #2
The root cause seems to be that onExit may miss the event when the subprocess is already closed.