]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.12] runtime: monitor for suspend/resume to kick timeouts
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 27 Aug 2019 12:46:16 +0000 (06:46 -0600)
committerDmitri Shuralyov <dmitshur@golang.org>
Fri, 3 Jan 2020 23:37:47 +0000 (23:37 +0000)
commit93f059947e31e8dda98c98880aee0e7b924d9a61
tree1fd0151a2b7de51d24684671262be4ba1aea4f79
parente4e29ee62b044b665881f4b220ee2204ad892a57
[release-branch.go1.12] runtime: monitor for suspend/resume to kick timeouts

Starting in Windows 8, the wait functions don't take into account
suspend time, even though the monotonic counters do. This results in
timer buckets stalling on resume. Therefore, this commit makes it so
that on resume, we return from the wait functions and recalculate the
amount of time left to wait.

This is a cherry pick of CL 191957 and its cleanup, CL 198417.

Updates #31528
Fixes #36376

Change-Id: I0db02cc72188cb620954e87a0180e0a3c83f4a56
Reviewed-on: https://go-review.googlesource.com/c/go/+/193607
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/213197
src/runtime/os_windows.go
src/runtime/syscall_windows.go