github.com/xtaci/gaio
v1.2.34
#1837 most downloaded on Go modules
xtaci/gaio
What this package is like to depend on
Last release 6 months ago
19 Feb 2026
Release timing varies
gaps range from 1 weeks to 6 months
Rarely documented
notes for 9 of 72 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
290 releases · first in 2019
9 releases in the last 12 months
see the full history below
Release timeline
290 releases · Dec 2019 to Feb 2026Releases
latest 60 of 290-
v1.2.35-0.20260219034617-d260d35ac02a19 Feb 2026 pre-releaseNothing published for this version
-
v1.2.3429 Jan 2026Release notes
Open source →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)
-
-
v1.2.3329 Jan 2026 -
v1.2.3229 Jan 2026Release notes
Open source →The previous implementation incorrectly extracted the type pointer (first word)
from Go interfaces instead of the data pointer (second word). Since all
*net.TCPConn share the same type pointer, this caused:- All connections to be identified by the same pointer value
- Only the first connection to be properly registered in the watcher
- Finalizers not being set correctly for subsequent connections
- GC-based cleanup to fail (only 1 connection cleaned up instead of all)
Root cause:
Go interfaces are laid out as [type_ptr, data_ptr] (two machine words).
The old code:ptr := *(*uintptr)(unsafe.Pointer(&conn))
only retrieved the type pointer, which is identical for all *net.TCPConn.Fix:
Changed to extract the second word (data pointer) which uniquely identifies
each connection instance:iface := ([2]uintptr)(unsafe.Pointer(&conn)) ptr := iface[1] // data pointerAffected functions:
- aioCreate(): connection registration and finalizer setup
- handleGC(): garbage collection callback handling
Also includes:
- Modernize codebase for Go 1.21+ (interface{} → any, clear() builtin)
- Use sync.Pool inline initialization
- Improve mutex handling with defer patterns
- Enhanced TestGC with 200 connections (requires ≥100 successful GC)
All tests pass with race detector enabled.
-
v1.2.3128 Jan 2026Release notes
Open source →- Add pre-allocated results slice to watcher struct to reuse across
WaitIO calls, reducing GC pressure in high-throughput scenarios - Replace reflect.ValueOf().Pointer() with unsafe pointer extraction
in aioCreate() and handleGC() for faster pointer retrieval - Remove reflect package import as it's no longer needed
Benchmark results (BenchmarkEcho1K):
Before: 478 B/op, 4 allocs/op
After: 0 B/op, 0 allocs/opMemory profile shows WaitIO allocation dropped from 60.51MB to 0MB,
which is critical for C10K+ concurrent connection scenarios. - Add pre-allocated results slice to watcher struct to reuse across
-
v1.2.3025 Jan 2026Nothing published for this version
-
v1.2.2924 Jan 2026Release notes
Open source →Bug fixes:
- Fix eventfd error handling: return actual syscall error instead of nil
- Fix rawRead/rawWrite return value handling on error (-1 case)
- Fix timer initialization: stop immediately after creation to avoid spurious timeout
- Fix timeout heap cleanup: properly remove entries in deliver()
Performance optimizations:
- Pre-allocate maps (descs, connIdents) with initial capacity for C10K scenarios
- Pre-allocate slices (pendingCreate, pendingProcessing, recycles, eventSet)
- Add fdDescPool to reuse fdDesc objects and reduce allocations
- Optimize handleEvents: use index-based loop and early length check
- Optimize reflect usage: remove redundant TypeOf() call in aioCreate
- Pre-allocate kqueue changes slice on BSD
-
v1.2.2818 Dec 2025 -
v1.2.2722 Nov 2025 -
v1.2.27-0.20250602090249-6b90ea1bf1f802 Jun 2025 pre-releaseNothing published for this version
-
v1.2.2629 Apr 2025 -
v1.2.2529 Apr 2025 -
v1.2.2420 Dec 2024Nothing published for this version
-
v1.2.2320 Dec 2024Nothing published for this version
-
v1.2.2209 Dec 2024Nothing published for this version
-
v1.2.22-0.20241209085808-b3d9e36bcb4809 Dec 2024 pre-releaseNothing published for this version
-
v1.2.22-0.20241004142020-0989b9de230804 Oct 2024 pre-releaseNothing published for this version
-
v1.2.22-0.20240827034451-41ed32c4c55327 Aug 2024 pre-releaseNothing published for this version
-
v1.2.22-0.20240802062326-4407e938eb5202 Aug 2024 pre-releaseNothing published for this version
-
v1.2.22-0.20240801154322-610b1ade858701 Aug 2024 pre-releaseNothing published for this version
-
v1.2.22-0.20240801094804-31d9ae026c4401 Aug 2024 pre-releaseNothing published for this version
-
v1.2.2101 Aug 2024Nothing published for this version
-
v1.2.2031 Jul 2024Nothing published for this version
-
v1.2.1931 Jul 2024Nothing published for this version
-
v1.2.19-0.20240731123728-5637657801be31 Jul 2024 pre-releaseNothing published for this version
-
v1.2.1831 Jul 2024Nothing published for this version
-
v1.2.18-0.20240731090523-36c638a2292831 Jul 2024 pre-releaseNothing published for this version
-
v1.2.18-0.20240731035834-d04d25ca203c31 Jul 2024 pre-releaseNothing published for this version
-
v1.2.1730 Jul 2024Nothing published for this version
-
v1.2.1629 Jul 2024Nothing published for this version
-
v1.2.1527 Jan 2024Nothing published for this version
-
v1.2.15-0.20240127035441-fbfb9567b14427 Jan 2024 pre-releaseNothing published for this version
-
v1.2.15-0.20220317100456-eb047083895517 Mar 2022 pre-releaseNothing published for this version
-
v1.2.1429 Jul 2021Nothing published for this version
-
v1.2.14-0.20210729163717-0e85e125a26229 Jul 2021 pre-releaseNothing published for this version
-
v1.2.14-0.20210729163508-3d0653dbcca929 Jul 2021 pre-releaseNothing published for this version
-
v1.2.1315 Jul 2021Nothing published for this version
-
v1.2.1215 Jul 2021Nothing published for this version
-
v1.2.12-0.20210715022038-d1789c953c4f15 Jul 2021 pre-releaseNothing published for this version
-
v1.2.1111 Jun 2021Nothing published for this version
-
v1.2.11-0.20210611042229-2fcc5908e1ec11 Jun 2021 pre-releaseNothing published for this version
-
v1.2.11-0.20210611041053-9b1750ba882111 Jun 2021 pre-releaseNothing published for this version
-
v1.2.11-0.20210611040055-bee7cb92b5bc11 Jun 2021 pre-releaseNothing published for this version
-
v1.2.11-0.20210508151253-c78c884b4b7a08 May 2021 pre-releaseNothing published for this version
-
v1.2.1006 May 2021Nothing published for this version
-
v1.2.10-0.20210506021033-e9b1aefd9ea206 May 2021 pre-releaseNothing published for this version
-
v1.2.10-0.20210506020816-ce20a809ac1606 May 2021 pre-releaseNothing published for this version
-
v1.2.10-0.20210501070612-99c634acbe7f01 May 2021 pre-releaseNothing published for this version
-
v1.2.10-0.20210501070500-2784b9a34a3a01 May 2021 pre-releaseNothing published for this version
-
v1.2.10-0.20210430040153-c8179c0f46c230 Apr 2021 pre-releaseNothing published for this version
-
v1.2.10-0.20210430040012-766c9e58cc5230 Apr 2021 pre-releaseNothing published for this version
-
v1.2.10-0.20210430035833-17488e13f45d30 Apr 2021 pre-releaseNothing published for this version
-
v1.2.10-0.20210430034611-01ecd930bb9530 Apr 2021 pre-releaseNothing published for this version
-
v1.2.10-0.20210430033405-7143d0f61f3430 Apr 2021 pre-releaseNothing published for this version
-
v1.2.10-0.20210429150707-d70fbc8a329b29 Apr 2021 pre-releaseNothing published for this version
-
v1.2.10-0.20210429150318-f65032586f6729 Apr 2021 pre-releaseNothing published for this version
-
v1.2.10-0.20210429112248-6535ef2303c929 Apr 2021 pre-releaseNothing published for this version
-
v1.2.10-0.20210429093124-12ef9a13a9d229 Apr 2021 pre-releaseNothing published for this version
-
v1.2.10-0.20210429091826-499e83338d4629 Apr 2021 pre-releaseNothing published for this version
-
v1.2.10-0.20210429091429-f2c967382b0d29 Apr 2021 pre-releaseNothing published for this version