generated from honeycombio/.github
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add a waitgroup to coordinate shutdown (#238)
## Which problem is this PR solving? - followup to #230 - closes #228 - closes #237 ## Short description of the changes Use a sync.WaitGroup to ensure that both an assembler and an event handler have stopped generating data before clean-up and process exit. Behind the curtain, the assembler is using the libhoney client managed within the event handler to ship assembler statistics. Closing that libhoney client has moved from the case statement in Start() to a separate Close() function on the event handler that is called after the wait group count indicates that all our internal routines have ended their loops. How much of this interface is kept in an OTLP-flavored event handler (and stats producer?) remains TBD. ## How to verify that this has the expected result No more intermittent panics on process exit?
- Loading branch information
Showing
5 changed files
with
48 additions
and
19 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
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