• Austin Clements's avatar
    runtime: consolidate "out of GC work" checks · 4cca1cc0
    Austin Clements authored
    We already have gcMarkWorkAvailable, but the check for GC mark work is
    open-coded in several places. Generalize gcMarkWorkAvailable slightly
    and replace these open-coded checks with calls to gcMarkWorkAvailable.
    
    In addition to cleaning up the code, this puts us in a better position
    to make this check slightly more complicated.
    
    Change-Id: I1b29883300ecd82a1bf6be193e9b4ee96582a860
    Reviewed-on: https://go-review.googlesource.com/16058Reviewed-by: default avatarRick Hudson <rlh@golang.org>
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    4cca1cc0
mgcmark.go 30.7 KB