On Fri Jul 14 18:44:09 2023 +0000, Zebediah Figura wrote:
Do we know that the thread actually has to die for this condition to kick in? Maybe this is evident somewhere in the tests, but I'm having a hard time finding it [they are pretty large and complex, though this is probably unavoidable]. I.e. I'm seeing two conditions for asyncs to get terminated: (1) APC port + no event + thread dies (2) no handles to the object left in originating process [+ thread dies?] We have (1) already implemented, and this patch series is adding (2), but it's not clear to me just from this patch that the "thread dies" part is necessary for (2). Is it? Am I missing a test somewhere?
I think test with CloseHandle() before terminating thread covers this case? With only condition (1) in place the tests with 'other process handle' enabled will fail. Test without "other process" still closes the original handle, although duplicates that into the same process thus showing that handles per process make a difference.