-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Try to drain incoming and peer queues for an amount of time (#1440
) ## Which problem is this PR solving? We're seeing that incoming and peer queues can sometimes build up and it takes a long time to recover. A theory is that this is because the collect loop has so many options, we should allow multiple messages to be read from the incoming and peer queues whenever that it's selected to be worked on. ## Short description of the changes - Add a new utility func that can read messages from a given span channel for up to 100 milliseconds, exiting early if the channel is empty - Update incoming and peer channels to use new func --------- Co-authored-by: Yingrong Zhao <22300958+VinozzZ@users.noreply.github.com>
- Loading branch information
1 parent
fa1520c
commit fc9f0eb
Showing
1 changed file
with
65 additions
and
44 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