On Tue Jul 22 21:23:46 2025 +0000, Paul Gofman wrote:
That sounds like the previous version of this MR (I think you can
still see it here: https://gitlab.winehq.org/wine/wine/-/merge_requests/7797/diffs?commit_id=40..., or from Rémi's gitlab as above), which indeed was not very nice WRT passing and waiting on multiple handles. If waiting for multiple handles is the issue (why?) then maybe some aggregate wait handle can be introduced (not sure that is needed though). But why that would warrant the whole parallel async termination wait object and logic implementation? Current wait_handle and the logic behind it should guarantee that it is signaled when async is cancelled and after the async is processed on client / IOSB filled (or client died). If that doesn't work this way then it should be fixed for it in the first place (but I think it works).
Note also that it is not needed to do NtWaitForMultipleObjects for multiple handles (which maybe can be unfortunate in the view of nsync, and anyway there is a limit on the number of handles there). It is possible to wait for single object one after another.