Skip to content

Commit

Permalink
doc: add release notes for new context functions
Browse files Browse the repository at this point in the history
For #40221
For #56661
For #57928

Change-Id: Iaf7425bb26eeb9c23235d13c786d5bb572159481
Reviewed-on: https://go-review.googlesource.com/c/go/+/486535
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Sameer Ajmani <sameer@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
  • Loading branch information
neild authored and Sajmani committed Apr 20, 2023
1 parent 547e8e2 commit b4b70a4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions doc/go1.21.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,27 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
TODO: complete this section
</p>

<dl id="context"><dt><a href="/pkg/context/">sync</a></dt>
<dd>
<p><!-- https://go.dev/issue/40221, CL 479918 -->
The new <a href="/pkg/context/#WithoutCancel"><code>WithoutCancel</code></a>
function returns a copy of a context that is not canceled when the original
context is canceled.
</p>
<p><!-- https://go.dev/issue/56661, CL 449318 -->
The new <a href="/pkg/context/#WithDeadlineCause"><code>WithDeadlineCause</code></a>
and <a href="/pkg/context/#WithTimeoutCause"><code>WithTimeoutCause</code></a>
functions provide a way to set a context cancellation cause when a deadline or
timer expires. The cause may be retrieved with the
<a href="/pkg/context/#Cause"><code>Cause</code></a> function.
</p>
<p><!-- https://go.dev/issue/57928, CL 482695 -->
The new <a href="/pkg/context/#AfterFunc"><code>AfterFunc</code></a>
function registers a function to run after a context has been cancelled.
</p>
</dd>
</dl>

<dl id="sync"><dt><a href="/pkg/sync/">sync</a></dt>
<dd>
<p><!-- https://go.dev/issue/56102, CL 451356 -->
Expand Down

0 comments on commit b4b70a4

Please sign in to comment.