On Mon May 5 13:33:52 2025 +0000, Jinoh Kang wrote:
Hmm, well I don't know enough about how asyncs are used but it seem
suspicious though. signaled probably does not mean what you think it means. For asynchronous non-blocking I/O, `signaled` must be set immediately to 1 so that the initial system call can return without blocking. The actual I/O completion delivery is done by signaling the *event* or posting to associated IOCP, not the async. I have a more-or-less comprehensive documentation about how async works at !6369. You can see the comprehensive list of scenarios when signaled is set to 1 here: https://gitlab.winehq.org/wine/wine/-/merge_requests/6369/diffs#9c0778468c57...
To be fair I have never seen anyone get async states right the first time, even I was bit by the haze that is the state flags. Maybe this is a strong argument that the async state machinery finally needs to be reworked.