]> Cypherpunks repositories - gostls13.git/commit
runtime: make netpoll events sources identifiable on Windows
authorqmuntal <quimmuntal@gmail.com>
Thu, 8 Feb 2024 07:46:24 +0000 (08:46 +0100)
committerQuim Muntal <quimmuntal@gmail.com>
Wed, 14 Feb 2024 08:33:36 +0000 (08:33 +0000)
commit1de46564a766f9647b22ebab0f35bccd14291460
treeb77e46f5c8c8b0f4e4f99777a4db67f1e53d353b
parent69d6c7b8ee62b4db5a8f6399e15f27d47b209a29
runtime: make netpoll events sources identifiable on Windows

This is another attempt at CL 558895, but without adding stale pollDescs
protection, which deviates from the original goal of the CL and adds
complexity without proper testing.

It is currently not possible to distinguish between a netpollBreak,
an internal/poll WSA operation, and an external WSA operation (as
in #58870). This can cause spurious wakeups when external WSA operations
are retrieved from the queue, as they are treated as netpollBreak
events.

This CL makes use of completion keys to identify the source of the
event.

While here, fix TestWSASocketConflict, which was not properly
exercising the "external WSA operation" case.

Change-Id: I91f746d300d32eb7fed3c8f27266fef379360d98
Reviewed-on: https://go-review.googlesource.com/c/go/+/561895
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
src/internal/poll/fd_windows_test.go
src/runtime/netpoll_windows.go