1
0
mirror of https://github.com/golang/go synced 2024-11-19 17:34:41 -07:00
go/src/runtime/testdata/testprogcgo
Austin Clements 4f34a52913 runtime: terminate locked OS thread if its goroutine exits
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: Keith Randall <khr@golang.org>
2017-10-11 17:47:21 +00:00
..
windows
aprof.go
callback.go
catchpanic.go runtime: forward crashing signals to late handlers 2017-08-29 07:40:19 +00:00
cgo.go runtime: get more info for TestCgoSignalDeadlock failures 2017-06-27 00:34:53 +00:00
crash.go
deadlock.go
dll_windows.go
dropm_stub.go
dropm.go
exec.go
lockosthread.c runtime: terminate locked OS thread if its goroutine exits 2017-10-11 17:47:21 +00:00
lockosthread.go runtime: terminate locked OS thread if its goroutine exits 2017-10-11 17:47:21 +00:00
main.go
numgoroutine.go
pprof.go
raceprof.go
racesig.go
threadpanic_unix.c
threadpanic_windows.c
threadpanic.go
threadpprof.go
threadprof.go
traceback.go
tracebackctxt_c.c
tracebackctxt.go