Skip to content

v1.2.34

@xtaci xtaci tagged this 29 Jan 13:58
This commit adds Windows platform support to gaio using WSAPoll-based
I/O multiplexing (Reactor pattern).

Changes:
- Add aio_windows.go: WSAPoll-based poller implementation
  - Socket pair for wakeup mechanism (loopback TCP connection)
  - WSARecv/WSASend for non-blocking I/O
  - WSADuplicateSocketW/WSASocketW for socket duplication
  - Proper socket closure using closesocket()

- Add affinity_windows.go: CPU affinity using SetThreadAffinityMask

- Add aio_unix.go: Extract Unix-specific dupconn() and closeFd()

- Update aio_test.go: Skip high-concurrency tests (8k+ connections) on
  Windows due to system ephemeral port limits

Tested on:
- Linux: All tests pass
- Windows: All tests pass (high-concurrency tests skipped)
Assets 2
Loading