Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/poll: stop using dedicated threads on Windows #37956

Closed
ianlancetaylor opened this issue Mar 20, 2020 · 3 comments
Closed

internal/poll: stop using dedicated threads on Windows #37956

ianlancetaylor opened this issue Mar 20, 2020 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Windows
Milestone

Comments

@ianlancetaylor
Copy link
Contributor

In the internal/poll package, on Windows, if the function CancelIoEx is not available on the system, we use dedicated threads for I/O so that requests can be canceled using the older CancelIo function.

According to https://docs.microsoft.com/en-us/windows/win32/fileio/cancelioex-func, CancelIoEx is available on Windows Vista, Windows Server 2008, and newer.

According to https://golang.org/wiki/MinimumRequirements, as of the Go 1.11 release we require at least Windows 7, or Windows 2008R2, or higher.

According to https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions, Windows 7 is newer than Windows Vista.

Therefore, I believe that all supported Windows systems support CancelIoEx, and we can remove the (rather complex) code that works using CancelIo.

@alexbrainman @mattn Do you agree?

@ianlancetaylor ianlancetaylor added OS-Windows NeedsFix The path to resolution is known, but the work has not been done. labels Mar 20, 2020
@ianlancetaylor ianlancetaylor added this to the Backlog milestone Mar 20, 2020
@alexbrainman
Copy link
Member

@ianlancetaylor I agree. We should remove all code that calls CancelIo, because it should not be needed now.

Do you want me to do the honors?

Alex

@ianlancetaylor
Copy link
Contributor Author

I can do it, unless you would like to. Thanks.

@gopherbot
Copy link

Change https://golang.org/cl/225060 mentions this issue: internal/poll: On Windows assume we have CancelIoEX

@golang golang locked and limited conversation to collaborators Mar 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Windows
Projects
None yet
Development

No branches or pull requests

3 participants