]> Cypherpunks repositories - gostls13.git/commit
cmd/go: use runtime.AddCleanup instead of runtime.SetFinalizer
authorCarlos Amedee <carlos@golang.org>
Mon, 6 Jan 2025 18:15:51 +0000 (13:15 -0500)
committerCarlos Amedee <carlos@golang.org>
Fri, 14 Feb 2025 15:29:47 +0000 (07:29 -0800)
commita8487dadeb6057418ee29b3ec8d2f1af0c91a42e
treee2ed292d1fc1b624a4d77b9fc82ce45a9fab0ed0
parent954e2c0b062d21f4914f04f0eb1aa7c5197ee92c
cmd/go: use runtime.AddCleanup instead of runtime.SetFinalizer

Replace the usage of runtime.SetFinalizer with runtime.AddCleanup.
This changes a test and how when the Go command panics when a file is
left locked.

Updates #70907

Change-Id: I8d8c56d16486728f9bd4b910b81796ae506bda74
Reviewed-on: https://go-review.googlesource.com/c/go/+/640736
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/go/internal/base/limit.go
src/cmd/go/internal/lockedfile/lockedfile.go