acl-dev / acl

C/C++ server and network library, including coroutine,redis client,http/https/websocket,mqtt, mysql/postgresql/sqlite client with C/C++ for Linux, Android, iOS, MacOS, Windows, etc..
https://acl-dev.cn
GNU Lesser General Public License v3.0
2.84k stars 937 forks source link

fiber: bugfix for win32 (add_read and iocp_wait) #272

Closed sidyhe closed 2 years ago

sidyhe commented 2 years ago
  1. 初次event_add_read时类型未指定
  2. 函数GetQueuedCompletionStatusEx用法不正确
sidyhe commented 2 years ago

后续优化了重复代码, 以及一处日志错误

zhengshuxin commented 2 years ago

GetQueuedCompletionStatus() 返回 FALSE 后 倒数第二个参数 (OVERLAPPED**) &event 有没有可能非空呢?

sidyhe commented 2 years ago

根据MSDN文档, 返回FALSE表示没有IO完成

Remark:
This function returns FALSE when no I/O operation was dequeued.

https://docs.microsoft.com/en-us/windows/win32/fileio/getqueuedcompletionstatusex-func