]> Cypherpunks repositories - gostls13.git/commit
context: document how to release resources associated with Contexts.
authorSameer Ajmani <sameer@golang.org>
Tue, 14 Jun 2016 20:48:42 +0000 (16:48 -0400)
committerSameer Ajmani <sameer@golang.org>
Wed, 15 Jun 2016 00:30:46 +0000 (00:30 +0000)
commitc4692da9231c244a1275d42055e703b3f1dac25b
treebc81de8b63e2e3156da4698223f7b09d6e12dfb3
parent68697a3e82e19fef04c6af4a02340a1aa6e3bcf2
context: document how to release resources associated with Contexts.

Some users don't realize that creating a Context with a CancelFunc
attaches a subtree to the parent, and that that subtree is not released
until the CancelFunc is called or the parent is canceled.  Make this
clear early in the package docs, so that people learning about this
package have the right conceptual model.

Change-Id: I7c77a546c19c3751dd1f3a5bc827ad106dd1afbf
Reviewed-on: https://go-review.googlesource.com/24090
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/context/context.go