-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(externalclock): fix deadlock when sending time on unstarted Clock
Calling `SetTimestamp` on a clock will block until the `Run` goroutine has read on channel and acked on another channel. If the Clock isn't started (or has been closed) calling `SetTimestamp` blocks forever (unless clock is started later). This commit fixes this issue by setting time and signaling tickers in the calling goroutine (as opposed to `Run` goroutine). This change also means that `Run` doesn't do anything, so it is marked as deprecated.
- Loading branch information
Showing
4 changed files
with
60 additions
and
47 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
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