mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: implement runqdrain() for GC mark worker goroutines
Change-Id: Ida44a2e07f277bee8806538ecee4beee3474cf3d Reviewed-on: https://go-review.googlesource.com/c/go/+/310149 Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Michael Pratt <mpratt@google.com> Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
77860ad280
commit
fbb600b283
3 changed files with 45 additions and 8 deletions
|
|
@ -622,6 +622,9 @@ type p struct {
|
|||
// unit and eliminates the (potentially large) scheduling
|
||||
// latency that otherwise arises from adding the ready'd
|
||||
// goroutines to the end of the run queue.
|
||||
//
|
||||
// Note that while other P's may atomically CAS this to zero,
|
||||
// only the owner P can CAS it to a valid G.
|
||||
runnext guintptr
|
||||
|
||||
// Available G's (status == Gdead)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue