Skip to content

Reusable pools#129

Merged
camdencheek merged 1 commit intomainfrom
cc/reusable-err-pool
Jan 19, 2024
Merged

Reusable pools#129
camdencheek merged 1 commit intomainfrom
cc/reusable-err-pool

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
@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