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

x/sync/singleflight: add example of using Group #60208

Closed
karelbilek opened this issue May 15, 2023 · 3 comments
Closed

x/sync/singleflight: add example of using Group #60208

karelbilek opened this issue May 15, 2023 · 3 comments
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@karelbilek
Copy link

The documentation for singleflightdoesn't show any example of using singleflight.Group.

Thus it's not immediately clear whether the recommended usage is struct or pointer.

(This is not a general discussion/question about the proper use of the library, it's a request for adding documentation for it.)

@gopherbot gopherbot added this to the Unreleased milestone May 15, 2023
@heschi
Copy link
Contributor

heschi commented May 15, 2023

cc @bcmills

@heschi heschi added help wanted NeedsFix The path to resolution is known, but the work has not been done. labels May 15, 2023
@seankhliao seankhliao changed the title x/sync: add example of using singleflight.Group x/sync/singleflight: add example of using Group May 15, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/496535 mentions this issue: singleflight: example for using Group

@karelbilek
Copy link
Author

That looks amazing!

@golang golang locked and limited conversation to collaborators May 22, 2024
anatoliinzrnk added a commit to anatoliinzrnk/go-sync that referenced this issue Sep 25, 2024
Fixes golang/go#60208

Change-Id: I422a45c0f139ba47045f47cec1c96d300a2a424f
Reviewed-on: https://go-review.googlesource.com/c/sync/+/496535
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants