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

taskgroup: add a Gatherer type #8

Merged
merged 1 commit into from
Oct 6, 2024
Merged

taskgroup: add a Gatherer type #8

merged 1 commit into from
Oct 6, 2024

Conversation

creachadair
Copy link
Owner

@creachadair creachadair commented Oct 5, 2024

The Gatherer is intended to replace the Collector. Instead of wrapping tasks
that then have to be given to a Group, the Gatherer manages a run function.

Copy link
Collaborator

@danderson danderson left a comment

Choose a reason for hiding this comment

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

Seems reasonable, I think? Not sure how it'll combine with other things without playing with it, but seems like a reasonable wrapper.

collector.go Outdated Show resolved Hide resolved
collector.go Outdated Show resolved Hide resolved
@creachadair
Copy link
Owner Author

I'm not going to merge this just yet, I want to play around with it a bit more, but feel free to patch it and see if it does what you were hoping for 😄

@creachadair creachadair force-pushed the mjf/runner branch 4 times, most recently from 7a6a12c to b21e8e0 Compare October 6, 2024 15:00
@creachadair creachadair changed the title taskgroup: add sketch of Runner type taskgroup: add sketch of Gatherer type Oct 6, 2024
@creachadair creachadair changed the title taskgroup: add sketch of Gatherer type taskgroup: add a Gatherer type Oct 6, 2024
The Gatherer is intended to replace the Collector.  Instead of wrapping tasks
that then have to be given to a Group, the Gatherer manages a run function.

Also:
- Add basic tests
- Update README.md examples to use Gatherer
- Mark Collector as deprecated
- Isolate NoError so it can be deprecated later
@creachadair creachadair merged commit b85b384 into main Oct 6, 2024
1 check passed
@creachadair creachadair deleted the mjf/runner branch October 6, 2024 22:32
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.

2 participants