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

Reusable pools #129

Merged
merged 1 commit into from
Jan 19, 2024
Merged

Reusable pools #129

merged 1 commit into from
Jan 19, 2024

Conversation

camdencheek
Copy link
Member

This updates the pool types that collect results and errors to reset on Wait so they are reusable once waited on. Previously, if a pool was reused, the returned values of Wait() would contain the aggregated set of all previous uses. This wasn't explicitly a guarantee of the library before, but it does make it operate more like sync.WaitGroup and it's easy to do, so I think it's a positive change.

Fixes #128

Stacked on #126

Copy link
Member

@bobheadxi bobheadxi left a comment

Choose a reason for hiding this comment

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

Makes sense to me, getting the results from a previous Wait seems less than ideal 😂

Base automatically changed from cc/deterministic-result-order to main January 19, 2024 17:50
@camdencheek camdencheek merged commit 4c5c70a into main Jan 19, 2024
2 checks passed
@camdencheek camdencheek deleted the cc/reusable-err-pool branch January 19, 2024 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reset ErrorPool errors after calling Wait()
2 participants