Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
proposal: time: add a channel to time.Ticker to detect stopped tickers #35643
What version of Go are you using (
Adding a channel to the
I don't think your issue citations refer to your suggestion. Those issues are all suggesting that when a
It is the job of the standard library to provide strong, robust building blocks like time.Ticker.
This does not seem to come up often enough to be worth the added complexity and runtime cost of a second channel in the ticker interface for every user. If your use case really needs to know when the ticker has been stopped, then as has been pointed out it is easy to write and use a wrapper that provides that extra functionality.