-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The timer channels are created with a buffer. Because we aren't reusing them, we don't need to worry about draining that channel; the internal goroutine will still be able to write to the buffer and exit gracefully, at which point the GC will clean it all up. We *do* still need to call `Stop()` to tell the timer to clean up immediately, as otherwise it will run for its full duration which (in a tight loop) can cause timer goroutines to pile up.
- Loading branch information
Showing
3 changed files
with
3 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters