https://bugs.winehq.org/show_bug.cgi?id=38143
--- Comment #5 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Sebastian Lackner from comment #4)
Attached patch puts a thread into alertable state so that NtRemoveIoCompletion is actually able to fetch a waiting APC from the queue.
Does that match the Windows behaviour, or is it just a hack? Since applications can also queue their own APCs (with QueueUserAPC) Wine should try to stay as close as possible to the Windows behaviour. Moreover, please note that a wait is interrupted when APC calls are handled, so with your patch applied NtRemoveIoCompletion returns a different status value in some situations. It sounds like this might need some additional tests. ;)
That's the point of a bug report - discuss the problem and find a proper solution :)