• Dmitriy Vyukov's avatar
    runtime: ensure fair scheduling during frequent GCs · 90eca36a
    Dmitriy Vyukov authored
    What was happenning is as follows:
    Each writer goroutine always triggers GC during its scheduling quntum.
    After GC goroutines are shuffled so that the timer goroutine is always second in the queue.
    This repeats infinitely, causing timer goroutine starvation.
    Fixes #7126.
    
    R=golang-codereviews, shanemhansen, khr, khr
    CC=golang-codereviews
    https://golang.org/cl/53080043
    90eca36a
proc_test.go 8.88 KB