From b4b70a4617fa318ae3e3f3b3d1bb9241d4dc0f9e Mon Sep 17 00:00:00 2001 From: Damien Neil Date: Wed, 19 Apr 2023 12:31:27 -0700 Subject: [PATCH] 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 Reviewed-by: Sameer Ajmani TryBot-Result: Gopher Robot --- doc/go1.21.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/go1.21.html b/doc/go1.21.html index 911a8ddd19..e5c49912dd 100644 --- a/doc/go1.21.html +++ b/doc/go1.21.html @@ -84,6 +84,27 @@ Do not send CLs removing the interior tags from such phrases. TODO: complete this section

+
sync
+
+

+ The new WithoutCancel + function returns a copy of a context that is not canceled when the original + context is canceled. +

+

+ The new WithDeadlineCause + and WithTimeoutCause + functions provide a way to set a context cancellation cause when a deadline or + timer expires. The cause may be retrieved with the + Cause function. +

+

+ The new AfterFunc + function registers a function to run after a context has been cancelled. +

+
+
+
sync

-- 2.48.1