• Russ Cox's avatar
    runtime: work around false negative in deadlock detection · 5eb007de
    Russ Cox authored
    Not a complete fix for issue 3342, but fixes the trivial case.
    There may still be a race in the instants before and after
    a scavenger-induced garbage collection.
    
    Intended to be "obviously safe": a call to runtime·gosched
    before main.main is no different than a call to runtime.Gosched
    at the beginning of main.main, and it is (or had better be)
    safe to call runtime.Gosched at any point during main.
    
    Update #3342.
    
    R=iant
    CC=golang-dev
    https://golang.org/cl/5919052
    5eb007de
golden.out 222 Bytes