PackageTrack

Go modules · #1837

github.com/xtaci/gaio

v1.2.34xtaci/gaio

Release timeline

290 releases since 2019
2020202120222023202420252026

Releases

  1. v1.2.35-0.20260219034617-d260d35ac02a19 Feb 2026pre-release

    Nothing published for this version

  2. v1.2.3429 Jan 2026
    Release notes

    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)
    Open source →
  3. v1.2.3329 Jan 2026
    Release notes

    refactor: replace unsafe interface pointer access with reflect.ValueO…

    Open source →
  4. v1.2.3229 Jan 2026
    Release notes

    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:

    1. All connections to be identified by the same pointer value
    2. Only the first connection to be properly registered in the watcher
    3. Finalizers not being set correctly for subsequent connections
    4. 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 pointer
    

    Affected 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.

    Open source →
  5. v1.2.3128 Jan 2026
    Release notes
    • 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/op

    Memory profile shows WaitIO allocation dropped from 60.51MB to 0MB,
    which is critical for C10K+ concurrent connection scenarios.

    Open source →
  6. v1.2.3025 Jan 2026

    Nothing published for this version

  7. v1.2.2924 Jan 2026
    Release notes

    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
    Open source →
  8. v1.2.2818 Dec 2025
    Release notes

    Fix: whenever a request is pushed onto w.timeouts, compare it with th…

    Open source →
  9. v1.2.2722 Nov 2025
    Release notes

    use channel to notify buffer swap to create a full memory barrier, wh…

    Open source →
  10. v1.2.27-0.20250602090249-6b90ea1bf1f82 Jun 2025pre-release

    Nothing published for this version

  11. v1.2.2629 Apr 2025
    Release notes

    same with previous commit

    Open source →
  12. v1.2.2529 Apr 2025
    Release notes

    to prevent allocation of the same address for net.Conn

    Open source →
  13. v1.2.2420 Dec 2024

    Nothing published for this version

  14. v1.2.2320 Dec 2024

    Nothing published for this version

  15. v1.2.229 Dec 2024

    Nothing published for this version

  16. v1.2.22-0.20241209085808-b3d9e36bcb489 Dec 2024pre-release

    Nothing published for this version

  17. v1.2.22-0.20241004142020-0989b9de23084 Oct 2024pre-release

    Nothing published for this version

  18. v1.2.22-0.20240827034451-41ed32c4c55327 Aug 2024pre-release

    Nothing published for this version

  19. v1.2.22-0.20240802062326-4407e938eb522 Aug 2024pre-release

    Nothing published for this version

  20. v1.2.22-0.20240801154322-610b1ade85871 Aug 2024pre-release

    Nothing published for this version

  21. v1.2.22-0.20240801094804-31d9ae026c441 Aug 2024pre-release

    Nothing published for this version

  22. v1.2.211 Aug 2024

    Nothing published for this version

  23. v1.2.2031 Jul 2024

    Nothing published for this version

  24. v1.2.1931 Jul 2024

    Nothing published for this version

  25. v1.2.19-0.20240731123728-5637657801be31 Jul 2024pre-release

    Nothing published for this version

  26. v1.2.1831 Jul 2024

    Nothing published for this version

  27. v1.2.18-0.20240731090523-36c638a2292831 Jul 2024pre-release

    Nothing published for this version

  28. v1.2.18-0.20240731035834-d04d25ca203c31 Jul 2024pre-release

    Nothing published for this version

  29. v1.2.1730 Jul 2024

    Nothing published for this version

  30. v1.2.1629 Jul 2024

    Nothing published for this version

  31. v1.2.1527 Jan 2024

    Nothing published for this version

  32. v1.2.15-0.20240127035441-fbfb9567b14427 Jan 2024pre-release

    Nothing published for this version

  33. v1.2.15-0.20220317100456-eb047083895517 Mar 2022pre-release

    Nothing published for this version

  34. v1.2.1429 Jul 2021

    Nothing published for this version

  35. v1.2.14-0.20210729163717-0e85e125a26229 Jul 2021pre-release

    Nothing published for this version

  36. v1.2.14-0.20210729163508-3d0653dbcca929 Jul 2021pre-release

    Nothing published for this version

  37. v1.2.1315 Jul 2021

    Nothing published for this version

  38. v1.2.1215 Jul 2021

    Nothing published for this version

  39. v1.2.12-0.20210715022038-d1789c953c4f15 Jul 2021pre-release

    Nothing published for this version

  40. v1.2.1111 Jun 2021

    Nothing published for this version

  41. v1.2.11-0.20210611042229-2fcc5908e1ec11 Jun 2021pre-release

    Nothing published for this version

  42. v1.2.11-0.20210611041053-9b1750ba882111 Jun 2021pre-release

    Nothing published for this version

  43. v1.2.11-0.20210611040055-bee7cb92b5bc11 Jun 2021pre-release

    Nothing published for this version

  44. v1.2.11-0.20210508151253-c78c884b4b7a8 May 2021pre-release

    Nothing published for this version

  45. v1.2.106 May 2021

    Nothing published for this version

  46. v1.2.10-0.20210506021033-e9b1aefd9ea26 May 2021pre-release

    Nothing published for this version

  47. v1.2.10-0.20210506020816-ce20a809ac166 May 2021pre-release

    Nothing published for this version

  48. v1.2.10-0.20210501070612-99c634acbe7f1 May 2021pre-release

    Nothing published for this version

  49. v1.2.10-0.20210501070500-2784b9a34a3a1 May 2021pre-release

    Nothing published for this version

  50. v1.2.10-0.20210430040153-c8179c0f46c230 Apr 2021pre-release

    Nothing published for this version

  51. v1.2.10-0.20210430040012-766c9e58cc5230 Apr 2021pre-release

    Nothing published for this version

  52. v1.2.10-0.20210430035833-17488e13f45d30 Apr 2021pre-release

    Nothing published for this version

  53. v1.2.10-0.20210430034611-01ecd930bb9530 Apr 2021pre-release

    Nothing published for this version

  54. v1.2.10-0.20210430033405-7143d0f61f3430 Apr 2021pre-release

    Nothing published for this version

  55. v1.2.10-0.20210429150707-d70fbc8a329b29 Apr 2021pre-release

    Nothing published for this version

  56. v1.2.10-0.20210429150318-f65032586f6729 Apr 2021pre-release

    Nothing published for this version

  57. v1.2.10-0.20210429112248-6535ef2303c929 Apr 2021pre-release

    Nothing published for this version

  58. v1.2.10-0.20210429093124-12ef9a13a9d229 Apr 2021pre-release

    Nothing published for this version

  59. v1.2.10-0.20210429091826-499e83338d4629 Apr 2021pre-release

    Nothing published for this version

  60. v1.2.10-0.20210429091429-f2c967382b0d29 Apr 2021pre-release

    Nothing published for this version