1
0
mirror of https://github.com/golang/go synced 2024-11-06 05:26:11 -07:00

runtime: clarify SetFinalizer docs

Fixes #24480

Change-Id: I7db721fb71a17f07472ec7f216478e7887435639
Reviewed-on: https://go-review.googlesource.com/122557
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Ian Lance Taylor 2018-07-06 17:06:55 -07:00
parent eab57b27f5
commit fb59bccef3

View File

@ -267,8 +267,8 @@ func runfinq() {
// is not guaranteed to run, because there is no ordering that
// respects the dependencies.
//
// The finalizer for obj is scheduled to run at some arbitrary time after
// obj becomes unreachable.
// The finalizer is scheduled to run at some arbitrary time after the
// program can no longer reach the object to which obj points.
// There is no guarantee that finalizers will run before a program exits,
// so typically they are useful only for releasing non-memory resources
// associated with an object during a long-running program.