Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async wait in delivery loop to avoid thread pool starvation #121

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

patrikwlund
Copy link

I swapped BlockingCollection for Channel so that the delivery loop can wait asynchronously for new deliveries.

The current solution provided from #118 hogs threads in the thread pool by continously doing blocking operations. This causes slowdowns if you create FakeModel instances at scale because of how long it takes for the thread pool to grow. One of our tests went from 100ms to 30s.

@odalet odalet merged commit c61848b into addupsolutions:master Dec 8, 2022
@patrikwlund patrikwlund deleted the avoid-hogging-threads branch December 8, 2022 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants