• Austin Clements's avatar
    runtime: terminate locked OS thread if its goroutine exits · 4f34a529
    Austin Clements authored
    runtime.LockOSThread is sometimes used when the caller intends to put
    the OS thread into an unusual state. In this case, we never want to
    return this thread to the runtime thread pool. However, currently
    exiting the goroutine implicitly unlocks its OS thread.
    
    Fix this by terminating the locked OS thread when its goroutine exits,
    rather than simply returning it to the pool.
    
    Fixes #20395.
    
    Change-Id: I3dcec63b200957709965f7240dc216fa84b62ad9
    Reviewed-on: https://go-review.googlesource.com/46038
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    4f34a529
Name
Last commit
Last update
..
windows Loading commit data...
aprof.go Loading commit data...
callback.go Loading commit data...
catchpanic.go Loading commit data...
cgo.go Loading commit data...
crash.go Loading commit data...
deadlock.go Loading commit data...
dll_windows.go Loading commit data...
dropm.go Loading commit data...
dropm_stub.go Loading commit data...
exec.go Loading commit data...
lockosthread.c Loading commit data...
lockosthread.go Loading commit data...
main.go Loading commit data...
numgoroutine.go Loading commit data...
pprof.go Loading commit data...
raceprof.go Loading commit data...
racesig.go Loading commit data...
threadpanic.go Loading commit data...
threadpanic_unix.c Loading commit data...
threadpanic_windows.c Loading commit data...
threadpprof.go Loading commit data...
threadprof.go Loading commit data...
traceback.go Loading commit data...
tracebackctxt.go Loading commit data...
tracebackctxt_c.c Loading commit data...