-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow periodic flushes to Stop being emitted. (#146)
* allow periodic flushes to Stop being emitted. This introduces a new Stop() method and changes the behavior of the Start() method on a store just slightly. store.Start(), if called while a periodic flush goroutine is currently running, causes the existing goroutine to stop and be replaced with a new goroutine. That is, the caller can now change the rate of flushing with calls such as: store.Start(time.NewTicker(1*time.Second)) store.Start(time.NewTicker(100*time.Second)) store.Stop() will stop any existing running periodic flush goroutine. If called multiple times, it is a no-op. * close instead of sending a bool * use the values from the closure
- Loading branch information
Showing
2 changed files
with
142 additions
and
16 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