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

Introduce ObjectPool and use it for ResilienceContext pooling #1111

Merged
merged 6 commits into from
Apr 12, 2023

Conversation

martintmk
Copy link
Contributor

@martintmk martintmk commented Apr 12, 2023

The issue or feature being addressed

Closes #955

Details on the issue fix or feature implementation

The ObjectPool is just trimmed down version of DefaultObjectPool.

I had to add more tests so the code passes our gates. I will re-run the benchmarks later once we add polling for CancellationTokenSource instances.

Additional changes:

  • Namespaces cleanup and moving some test utils to separate folder.

Confirm the following

  • I started this PR by branching from the head of the default branch
  • I have targeted the PR to merge into the default branch
  • I have included unit tests for the issue/feature
  • I have successfully run a local build

@martintmk martintmk added the v8 Issues related to the new version 8 of the Polly library. label Apr 12, 2023
@martintmk martintmk added this to the v8.0.0 milestone Apr 12, 2023
@martintmk martintmk self-assigned this Apr 12, 2023
@martintmk martintmk requested a review from geeknoid April 12, 2023 07:45
Copy link
Member

@martincostello martincostello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you re-run the benchmarks with this change so we can see the difference it makes?

src/Polly.Core/Utils/ObjectPool.cs Outdated Show resolved Hide resolved
@martintmk martintmk merged commit 5e19d1d into main Apr 12, 2023
@martintmk martintmk deleted the mtomka/object-pool branch April 12, 2023 10:37
@martintmk martintmk mentioned this pull request Apr 12, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 Issues related to the new version 8 of the Polly library.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Pooling of Context instances
2 participants