]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.13] 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)
committerAndrew Bonventre <andybons@golang.org>
Fri, 4 Oct 2019 00:03:51 +0000 (00:03 +0000)
commit84b070f6fab474f9e278d9e85b198e1382499b48
tree21ce9c286e6518d796b3f331582b1db2d7bee30e
parent17a492fdd5560a1b6e640a47a9ca83d2853341df
[release-branch.go1.13] 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 #34130

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>
src/runtime/os_windows.go
src/runtime/syscall_windows.go