]> Cypherpunks.ru repositories - gostls13.git/commitdiff
runtime: clarify SetFinalizer docs
authorIan Lance Taylor <iant@golang.org>
Sat, 7 Jul 2018 00:06:55 +0000 (17:06 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 9 Jul 2018 23:40:50 +0000 (23:40 +0000)
Fixes #24480

Change-Id: I7db721fb71a17f07472ec7f216478e7887435639
Reviewed-on: https://go-review.googlesource.com/122557
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/mfinal.go

index 6ce0312712f384ef90548537d1270d40ee88edee..a8c51e3e02b65247add75ec7b694151b64b86247 100644 (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.