• Dmitriy Vyukov's avatar
    runtime: fix program termination when main goroutine calls Goexit · 55e0f36f
    Dmitriy Vyukov authored
    Do not consider idle finalizer/bgsweep/timer goroutines as doing something useful.
    We can't simply set isbackground for the whole lifetime of the goroutines,
    because when finalizer goroutine calls user function, we do want to consider it
    as doing something useful.
    This is borken due to timers for quite some time.
    With background sweep is become even more broken.
    Fixes #7784.
    
    LGTM=rsc
    R=rsc
    CC=golang-codereviews
    https://golang.org/cl/87960044
    55e0f36f
crash_test.go 6.09 KB