]> Cypherpunks repositories - gostls13.git/commit
internal/poll: support async file operations on Windows
authorqmuntal <quimmuntal@gmail.com>
Tue, 25 Mar 2025 15:42:51 +0000 (16:42 +0100)
committerQuim Muntal <quimmuntal@gmail.com>
Wed, 26 Mar 2025 20:05:03 +0000 (13:05 -0700)
commit440a8f7024044387a6e440fc003bd8fd61908c81
tree5011c85ff61b2b5952b34012e0db4e80ccc4e7c5
parentb138f8e4d2912e1105b69b9aaa24c6e8250652c6
internal/poll: support async file operations on Windows

This CL adds support for async file operations on Windows. The affected
functions are Read, Write, Pread, and Pwrite.

The code has been slightly refactored to avoid duplication. Both the
async and sync variants follow the same code path, with the exception of
the async variant passes an overlapped structure to the syscalls
and supports the use of a completion port.

This doesn't change any user-facing behavior, as the os package still
sets the pollable parameter to false when calling FD.Init.

For #19098.

Change-Id: Iead6e51fa8f57e83456eb5ccdce28c2ea3846cc2
Reviewed-on: https://go-review.googlesource.com/c/go/+/660595
Reviewed-by: Dmitri Shuralyov <dmitshur@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
src/internal/poll/fd_windows_test.go
src/internal/syscall/windows/syscall_windows.go
src/internal/syscall/windows/zsyscall_windows.go