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

ignore timing out errors unless the timeout was specified to INFINITE #3

Conversation

bmc-msft
Copy link
Contributor

The documentation states that for timeout failures:

If a completion packet does not appear within the specified time, the function times out, returns FALSE, and sets *lpOverlapped to NULL.

Unless the user specified waiting for INFINITE, ignore timeout errors.

https://docs.microsoft.com/en-us/windows/win32/api/ioapiset/nf-ioapiset-getqueuedcompletionstatus

Brian Caswell added 3 commits August 24, 2021 18:11
The documentation states that for timeout failures:

If a completion packet does not appear within the specified time, the
function times out, returns FALSE, and sets *lpOverlapped to NULL.

Unless the user specifiedwaiting for INFINITE, ignore timeout errors.

https://docs.microsoft.com/en-us/windows/win32/api/ioapiset/nf-ioapiset-getqueuedcompletionstatus
@passcod
Copy link
Member

passcod commented Aug 25, 2021

Right, the failure alao happens on 1.0.5, and I'm Confused about it given it's saying the std (non group) implementation also fails. Which is new, it definitely passed when I published it. Perhaps DIE_WAIT needs incrementing for this test now for whatever reason.

In any case: tests! I'm Also Confused because I figured that with my comparative tests of grouped/normal (non grouped) I was testing behaviour compatibility. So, uh, if I'm not in this case, I need a test to show this.

@bmc-msft
Copy link
Contributor Author

Note, these unit tests pass when testing on machines with 32 cores as is.

@passcod passcod force-pushed the main branch 5 times, most recently from 382447b to d16879f Compare August 25, 2021 16:29
@passcod
Copy link
Member

passcod commented Aug 25, 2021

Alright, so I've fixed that test in CI. You can merge or rebase as you like.

I still need a test written for this PR that fails without your changes and passes with.

@bmc-msft
Copy link
Contributor Author

@passcod , I've merged main into my PR.

@bmc-msft
Copy link
Contributor Author

Note, I believe reliably testing for this specific change will be difficult. It's highly dependent on Window's scheduler as to when an IO completion packet makes it to the queue.

The previous behavior was more reliable on machines with large numbers of unused cores.

@passcod
Copy link
Member

passcod commented Aug 26, 2021

Alright then, I'll trust you know what you're about.

@passcod passcod merged commit 6c37f76 into watchexec:main Aug 26, 2021
passcod added a commit that referenced this pull request Aug 26, 2021
@passcod
Copy link
Member

passcod commented Aug 26, 2021

Released in 1.0.6

@bmc-msft bmc-msft deleted the ignore-GetQueuedCompletionStatus-timeout-errors branch August 26, 2021 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants