Conversation
The GC issue is already resolved in Go 1.23. Copying the comments from time.After() to explain this.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: huww98 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| // As of Go 1.23, the garbage collector can recover unreferenced, | ||
| // unstopped timers. There is no reason to prefer NewTimer when After will do. |
There was a problem hiding this comment.
With the change in Go 1.23, this information isn’t particularly useful for callers of After; it’s useful for callers of NewTimer who may want to reconsider and use After instead.
There was a problem hiding this comment.
These are just copied from the stdlib. I think this can be useful for people who are still using Go older than 1.23, as the comments implies there are GC issues before 1.23.
What type of PR is this?
/kind documentation
What this PR does / why we need it:
The GC issue is already resolved in Go 1.23. Copying the comments from time.After() to explain this.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note: