aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql/sql.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2023-11-21 23:57:36 +0000
committerMichael Knyszek <mknyszek@google.com>2023-11-22 16:31:49 +0000
commitcea35baf12cd8996c97f6dd3e62a0165d0e50843 (patch)
tree74e8ee52aff8c8a101a248d293724c6017723c6d /src/database/sql/sql.go
parent23c0d30244d5e38d928e68661bf39458eb85d2b2 (diff)
downloadgo-cea35baf12cd8996c97f6dd3e62a0165d0e50843.tar.xz
runtime: hold sched.lock over traceThreadDestroy in dropm
This is required by traceThreadDestroy, though it's not strictly necessary in this case. The requirement to hold sched.lock comes from the assumption that traceThreadDestroy is getting called when the thread leaves the tracer's view, but in this case the extra m that dropm is dropping never leaves the allm list. Nevertheless, traceThreadDestroy requires it just as a safety measure, and that's reasonable. dropm is generally rare on pthread platforms, so the extra lock acquire over this short critical section (and only when tracing is enabled) is fine. Change-Id: Ib631820963c74f2f087d14a0067d0441d75d6785 Reviewed-on: https://go-review.googlesource.com/c/go/+/544396 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/database/sql/sql.go')
0 files changed, 0 insertions, 0 deletions