]> Cypherpunks repositories - gostls13.git/commit
internal/poll: move buffer pinning inside execIO
authorqmuntal <quimmuntal@gmail.com>
Fri, 30 Jan 2026 13:29:58 +0000 (14:29 +0100)
committerQuim Muntal <quimmuntal@gmail.com>
Mon, 2 Feb 2026 19:06:07 +0000 (11:06 -0800)
commitcce3fea08f8b2509b7651ee552111a8cc763a459
tree460fa286b57d29559a925aa7b7c98261b1592bff
parent3b2a451cef467e42e41552cf490498d3bf39df29
internal/poll: move buffer pinning inside execIO

This is a step towards deferring adding the handle to IOCP until the
first IO operation.

The goal of this CL is to avoid the fd.isBlocking check in fd.pin,
which was happening outside execIO, and making buffer pinning less
error-prone.

This also fixes an issue where buffer used in Pwrite and WriteTo
were unpinned too early when the write buffer was larger than the
maximum chunk size.

For #76391

Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-longtest,gotip-windows-amd64-race
Change-Id: Ia181dcb57a559ae466a4341c36a307ad6678aac0
Reviewed-on: https://go-review.googlesource.com/c/go/+/740561
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/internal/poll/fd_windows.go
src/internal/poll/sendfile_windows.go