Repository navigation
V2: Rework the entire library to use github.com/alitto/pond/v2 - #3
Merged
Merged
Conversation
leegm-pp
reviewed
Sep 30, 2026
leegm-pp
left a comment
There was a problem hiding this comment.
Partial review - will have a further look tomorrow. Couple of thoughts so far though
leegm-pp
reviewed
Oct 8, 2026
leegm-pp
reviewed
Oct 12, 2026
As it is always 0 for correct functioning, there's no reason to ever allow modifying it at the moment.
leegm-pp
reviewed
Oct 13, 2026
leegm-pp
approved these changes
Oct 15, 2026
|
🎉 This PR is included in version 1.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a fairly major change, but it's also fully end-to-end testable using the included helper programs and is small/simple enough to explain on a single sheet of paper.
The way this works is extremely simple:
Context cancellation powers the entire shutdown: when calling
manager.Run(ctx), it waits on<-ctx.Done(). This is the only exit condition, and shuts down the fetchers (cancelling their context and ending them) first, followed by the workers.see
v2/cmd/echo/main.gofor a full, complete example of how to use this as a consumer.