]> Cypherpunks repositories - gostls13.git/commitdiff
doc: describe vet -lostcancel in go1.7 release notes
authorAlan Donovan <adonovan@google.com>
Tue, 21 Jun 2016 15:11:50 +0000 (11:11 -0400)
committerAlan Donovan <adonovan@google.com>
Tue, 21 Jun 2016 18:25:53 +0000 (18:25 +0000)
Change-Id: Ie1c95fd0869307551bfcf76bf45c13372723fbba
Reviewed-on: https://go-review.googlesource.com/24288
Reviewed-by: Rob Pike <r@golang.org>
doc/go1.7.html

index 5f6b6a69343ee1d26c5c535e42b7630e4d5f2978..8a76b369bc652b0e2079ff5f1049556b56d7f3df 100644 (file)
@@ -288,6 +288,18 @@ To avoid confusion with the new <code>-tests</code> check, the old, unadvertised
 <code>-test</code> option has been removed; it was equivalent to <code>-all</code> <code>-shadow</code>.
 </p>
 
+<p id="vet_lostcancel">
+The <code>vet</code> command also has a new check,
+<code>-lostcancel</code>, which detects failure to call the
+cancellation function returned by the <code>WithCancel</code>,
+<code>WithTimeout</code>, and <code>WithDeadline</code> functions in
+Go 1.7's new <code>context</code> package (see <a
+href='#context'>below</a>).
+Failure to call the function prevents the new <code>Context</code>
+from being reclaimed until its parent is cancelled.
+(The background context is never cancelled.)
+</p>
+
 <h3 id="cmd_dist">Go tool dist</h3>
 
 <p>