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-on: https://go-review.googlesource.com/c/go/+/742280 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>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attribution license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.