[go] internal/poll: make waitIO more idempontent

0 views
Skip to first unread message

Quim Muntal (Gerrit)

unread,
Feb 6, 2026, 3:27:48 PM (2 days ago) Feb 6
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Michael Pratt, Damien Neil, Go LUCI, Alex Brainman, golang-co...@googlegroups.com

Quim Muntal submitted the change

Change information

Commit message:
internal/poll: make waitIO more idempontent

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

waitIO should use the overlapped event if it is provided, regardless of
whether FD is pollable or not. This simplifies reasoning about the code
and makes it more robust to race conditions.

While here, remove the panic in waitIO that was triggered when called
with a blocking handle. That shouldn't happen, but if it does,
fd.pd.wait will return an error that will already be promoted to
a panic.

For #76391
Change-Id: I8e84592568a3ef66e71161eb2c5f515dde638117
Reviewed-by: Damien Neil <dn...@google.com>
Reviewed-by: Michael Pratt <mpr...@google.com>
Files:
  • M src/internal/poll/fd_windows.go
Change size: XS
Delta: 1 file changed, 1 insertion(+), 4 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Damien Neil, +1 by Michael Pratt
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I8e84592568a3ef66e71161eb2c5f515dde638117
Gerrit-Change-Number: 742280
Gerrit-PatchSet: 2
Gerrit-Owner: Quim Muntal <quimm...@gmail.com>
Gerrit-Reviewer: Alex Brainman <alex.b...@gmail.com>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-Reviewer: Quim Muntal <quimm...@gmail.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages