-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
consume libhoney responses channel in a thread, preventing a deadlock
We found that libhoney provides a responses() channel which MUST be read to prevent eventual deadlock of the process. libhoney-rust writes to the responses channel for every event written to honeycomb. This eventually causes the work_sender thread to block, which causes the trace-data sending thread to block. We now consume the honeycomb responses in a tight loop, eventually exiting if we detect that the channel has disconnected and all messages have been consumed (the `responses.recv.is_err()` case.)
- Loading branch information
1 parent
1ff68be
commit 9dd18b5
Showing
2 changed files
with
18 additions
and
1 deletion.
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