https://bugs.winehq.org/show_bug.cgi?id=57388
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #1 from Zeb Figura z.figura12@gmail.com --- Certain types of completion signalling are potentially cross-process, and need to be managed by a central authority (the wineserver). This means RPC to the wineserver process, which is slow.
This will happen if:
* an event is passed;
* an APC routine is passed;
* the operation might queue a packet to a completion port. (Note that only the server knows if there is in fact a completion port associated with this file.)
The last one is presumably the culprit here, assuming you're not passing a valid event. If no OVERLAPPED structure is provided, completion is never queued, but if a valid OVERLAPPED structure is provided, it will be.
On the other hand, a non-overlapped file handle can't be associated with a port, so we can do a little better, and avoid trying to queue completion in that case. I've sent https://gitlab.winehq.org/wine/wine/-/merge_requests/6768.