]> Cypherpunks repositories - gostls13.git/commit
runtime: add new adjusttimers function
authorIan Lance Taylor <iant@golang.org>
Thu, 11 Apr 2019 04:54:58 +0000 (21:54 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 22 Oct 2019 21:40:27 +0000 (21:40 +0000)
commit220150ff3c03a0d2618093689ab129ab5ea7dc7b
tree958bc276c8b3f442bb7b380a393d949e117945e2
parentb2ea4e6d345652f44595c038301720344350b459
runtime: add new adjusttimers function

The adjusttimers function is where we check the adjustTimers field in
the P struct to see if we need to resort the heap. We walk forward in
the heap and find and resort timers that have been modified, until we
find all the timers that were modified to run earlier. Along the way
we remove deleted timers.

Updates #27707

Change-Id: I1cba7fe77b8112b7e9a9dba80b5dfb08fcc7c568
Reviewed-on: https://go-review.googlesource.com/c/go/+/171877
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/time.go