]> Cypherpunks repositories - gostls13.git/commitdiff
Clarify that a new goroutine is not started for each finalizer.
authorIan Lance Taylor <iant@golang.org>
Thu, 15 Jul 2010 19:32:38 +0000 (12:32 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 15 Jul 2010 19:32:38 +0000 (12:32 -0700)
R=rsc
CC=golang-dev
https://golang.org/cl/1698051

src/pkg/runtime/extern.go

index d3d1dabdf6ba1fe9fef4c8beeea7d8dde8725e85..c0cab22e95012927d1881a18a851cfe70754441f 100644 (file)
@@ -105,11 +105,11 @@ func Semrelease(s *uint32)
 
 // SetFinalizer sets the finalizer associated with x to f.
 // When the garbage collector finds an unreachable block
-// with an associated finalizer, it clears the association and creates
-// a new goroutine running f(x).  Creating the new goroutine makes
-// x reachable again, but now without an associated finalizer.
-// Assuming that SetFinalizer is not called again, the next time
-// the garbage collector sees that x is unreachable, it will free x.
+// with an associated finalizer, it clears the association and runs
+// f(x) in a separate goroutine.  This makes x reachable again, but
+// now without an associated finalizer.  Assuming that SetFinalizer
+// is not called again, the next time the garbage collector sees
+// that x is unreachable, it will free x.
 //
 // SetFinalizer(x, nil) clears any finalizer associated with f.
 //