-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
I noticed that the current documentation for time.Ticker doesn't clearly mention that you can call Reset even after stopping the ticker with Stop. The Reset method was added later, but when it was introduced, the documentation for Stop was not updated accordingly. The current documentation suggests that the main reason the channel is not closed is to prevent a concurrent goroutine reading from the channel from seeing an erroneous “tick.” However, after the introduction of Reset, the primary reason for keeping the channel open is actually to allow a subsequent reset.
It would be great to update the docs to explicitly state that Reset can be used on a ticker even after Stop has been called, and that the channel isn't closed for that reason.
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.