]> Cypherpunks repositories - gostls13.git/commit
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)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 30 Aug 2019 14:20:49 +0000 (14:20 +0000)
commitd85072ff86e61752fb89363d7c929c850e0a8a8d
tree8dd9af2e05dd9b8826b8faf6eadb643281e362a4
parent8c5de667d3b1349a3058e4c57b01f0309502a118
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.

Fixes: #31528
Change-Id: I0db02cc72188cb620954e87a0180e0a3c83f4a56
Reviewed-on: https://go-review.googlesource.com/c/go/+/191957
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
src/runtime/os_windows.go
src/runtime/syscall_windows.go