Skip to content

Commit b4b70a4

Browse files
neildSajmani
authored andcommitted
doc: add release notes for new context functions
For #40221 For #56661 For #57928 Change-Id: Iaf7425bb26eeb9c23235d13c786d5bb572159481 Reviewed-on: https://go-review.googlesource.com/c/go/+/486535 Run-TryBot: Damien Neil <[email protected]> Reviewed-by: Sameer Ajmani <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 547e8e2 commit b4b70a4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

doc/go1.21.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,27 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
8484
TODO: complete this section
8585
</p>
8686

87+
<dl id="context"><dt><a href="/pkg/context/">sync</a></dt>
88+
<dd>
89+
<p><!-- https://go.dev/issue/40221, CL 479918 -->
90+
The new <a href="/pkg/context/#WithoutCancel"><code>WithoutCancel</code></a>
91+
function returns a copy of a context that is not canceled when the original
92+
context is canceled.
93+
</p>
94+
<p><!-- https://go.dev/issue/56661, CL 449318 -->
95+
The new <a href="/pkg/context/#WithDeadlineCause"><code>WithDeadlineCause</code></a>
96+
and <a href="/pkg/context/#WithTimeoutCause"><code>WithTimeoutCause</code></a>
97+
functions provide a way to set a context cancellation cause when a deadline or
98+
timer expires. The cause may be retrieved with the
99+
<a href="/pkg/context/#Cause"><code>Cause</code></a> function.
100+
</p>
101+
<p><!-- https://go.dev/issue/57928, CL 482695 -->
102+
The new <a href="/pkg/context/#AfterFunc"><code>AfterFunc</code></a>
103+
function registers a function to run after a context has been cancelled.
104+
</p>
105+
</dd>
106+
</dl>
107+
87108
<dl id="sync"><dt><a href="/pkg/sync/">sync</a></dt>
88109
<dd>
89110
<p><!-- https://go.dev/issue/56102, CL 451356 -->

0 commit comments

Comments
 (0)