On Tue Jul 22 20:30:14 2025 +0000, Paul Gofman wrote:
Besides that cancellation handling doesn't seem to belong to client and to IOSB status, what will happen with NtCancelIo wait if the thread or process which is supposed to notify cancel gets killed?
Also, maybe there is simplier way to achieve the same? Ref https://gitlab.winehq.org/wine/wine/-/merge_requests/8592 . It is not exactly related as touches different cases, in particular, NtCancelSynchronousIoFile() handling WRT the synchronous IO wait but not NtCancelIoFile with asynchronous IO. But is there anything which would prevent in principle creating and relaying to NtCancelIoFile the same wait_handle to the async being canceled and then just performing wait_async() on it same way as with synchronous IO? Presumably the cancellation then may go without much changes and complications on the server side or elsewhere. It will still need a way to wait for multiple asyncs, but then maybe cancel_async() may return the handles for all at once.