]> Cypherpunks repositories - gostls13.git/commit
internall/poll: remove bufs field from Windows' poll.operation
authorqmuntal <quimmuntal@gmail.com>
Mon, 25 Aug 2025 10:49:37 +0000 (12:49 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Wed, 27 Aug 2025 06:54:57 +0000 (23:54 -0700)
commitafc51ed007ad814fc11273f39055aeea71172557
treebc2489b3345217d5d0db1900f03d0d2dbf0b7038
parent801b74eb95bdd4175e808810e8430415d7bad76c
internall/poll: remove bufs field from Windows' poll.operation

The bufs field is used to avoid allocating it every time it is needed.
We can do better by using a sync.Pool to reuse allocations across
operations and FDs instead of the field.

A side benefit is that FD is now 16 bytes smaller and operation more
stateless.

Change-Id: I5d686d1526f6c63e7ca1ae84da1fbf2044b24703
Reviewed-on: https://go-review.googlesource.com/c/go/+/698798
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/internal/poll/fd_windows.go