doc: add release notes for cleanups and the unique package

For #71661.

Change-Id: I74870de3f17a938bc9fd83ccc41e13e64b55b5e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/671438
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
This commit is contained in:
Michael Anthony Knyszek 2025-05-09 19:45:25 +00:00 committed by Gopher Robot
parent 5b0b4c01ba
commit e27a6e9e53
4 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,5 @@
Cleanup functions scheduled by [AddCleanup] are now executed
concurrently and in parallel, making cleanups more viable for heavy
use like the [unique] package. Note that individual cleanups should
still shunt their work to a new goroutine if they must execute or
block for a long time to avoid blocking the cleanup queue.

View File

@ -0,0 +1,8 @@
When `GODEBUG=checkfinalizers=1` is set, the runtime will run
diagnostics on each garbage collection cycle to find common issues
with how the program might use finalizers and cleanups, such as those
described [in the GC
guide](/doc/gc-guide#Finalizers_cleanups_and_weak_pointers). In this
mode, the runtime will also regularly report the finalizer and
cleanup queue lengths to stderr to help identify issues with
long-running finalizers and/or cleanups.

View File

@ -0,0 +1,4 @@
The [unique] package now reclaims interned values more eagerly,
more efficiently, and in parallel. As a consequence, applications using
[Make] are now less likely to experience memory blow-up when lots of
truly unique values are interned.

View File

@ -0,0 +1,4 @@
Values passed to [Make] containing [Handle]s previously required multiple
garbage collection cycles to collect, proportional to the depth of the chain
of [Handle] values. Now, they are collected promptly in a single cycle, once
unused.