]> Cypherpunks repositories - gostls13.git/commit
internal/poll: remove rsa field from Windows' poll.operation
authorqmuntal <quimmuntal@gmail.com>
Mon, 25 Aug 2025 09:44:16 +0000 (11:44 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Wed, 27 Aug 2025 06:54:35 +0000 (23:54 -0700)
commit801b74eb95bdd4175e808810e8430415d7bad76c
treecf855941a74286011e4f458566450180e2e21d25
parentfa18c547cd891e526d2e01cfbc17961de45c31a5
internal/poll: remove rsa field from Windows' poll.operation

The rsa field was added to the operation structure 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: I3b69a59e36b27f2cdd076cebd8d27a2a350b9c43
Reviewed-on: https://go-review.googlesource.com/c/go/+/698875
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
src/internal/poll/fd_windows.go