diff options
| author | Austin Clements <austin@google.com> | 2018-08-09 23:47:37 -0400 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2018-08-20 18:19:22 +0000 |
| commit | 3578918b6614effaeaa581687d810b74e342e0f8 (patch) | |
| tree | 555f4a6154463a0434bd2b7bd1be521306007a63 /src/runtime/netpoll_kqueue.go | |
| parent | 723479bc30f998f29ecbba7caea118ac4e2c9afd (diff) | |
| download | go-3578918b6614effaeaa581687d810b74e342e0f8.tar.xz | |
runtime: replace manually managed G dequeues with a type
There are two manually managed G dequeues. Abstract these both into a
shared gQueue type. This also introduces a gList type, which we'll use
to replace several manually-managed G lists in follow-up CLs.
This makes the code more readable and maintainable. gcFlushBgCredit in
particular becomes much easier to follow. It also makes it easier to
introduce more G queues in the future. Finally, the gList type clearly
distinguishes between lists of Gs and individual Gs; currently both
are represented by a *g, which can easily lead to confusion and bugs.
Change-Id: Ic7798841b405d311fc8b6aa5a958ffa4c7993c6c
Reviewed-on: https://go-review.googlesource.com/129396
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
Diffstat (limited to 'src/runtime/netpoll_kqueue.go')
0 files changed, 0 insertions, 0 deletions
