Skip to content

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