]> Cypherpunks repositories - gostls13.git/commit
runtime: support disabling goroutine scheduling by class
authorAustin Clements <austin@google.com>
Tue, 11 Sep 2018 15:28:24 +0000 (11:28 -0400)
committerAustin Clements <austin@google.com>
Tue, 2 Oct 2018 20:35:29 +0000 (20:35 +0000)
commit6e9fb11b3a314b78f9c2cdb35e3d71a5cce4e06b
tree638cfc2deb2d86738a57a9db8678ac100598c1d0
parent29b21ec4c371061a99dfaac356e54b3c62c5853f
runtime: support disabling goroutine scheduling by class

This adds support for disabling the scheduling of user goroutines
while allowing system goroutines like the garbage collector to
continue running. User goroutines pass through the usual state
transitions, but if we attempt to actually schedule one, it will get
put on a deferred scheduling list.

Updates #26903. This is preparation for unifying STW GC and concurrent
GC.

Updates #25578. This same mechanism can form the basis for disabling
all but a single user goroutine for the purposes of debugger function
call injection.

Change-Id: Ib72a808e00c25613fe6982f5528160d3de3dbbc6
Reviewed-on: https://go-review.googlesource.com/c/134779
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/proc.go
src/runtime/runtime2.go