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

Fix data race in example #260

Merged
merged 2 commits into from
May 8, 2024
Merged

Fix data race in example #260

merged 2 commits into from
May 8, 2024

Conversation

Zerpet
Copy link
Contributor

@Zerpet Zerpet commented May 7, 2024

Some users rely on this example as a starting point to their
applications. This commit fixes a data race that could cause issues in
any code that relied on the example as base.

Fixes #72

@Zerpet Zerpet added this to the 1.10.0 milestone May 7, 2024
@Zerpet Zerpet self-assigned this May 7, 2024
@Zerpet Zerpet requested a review from lukebakken May 7, 2024 12:20
Copy link
Contributor

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

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

I can't run Example_publish or Example_consume because they do not follow godoc example format:

https://go.dev/blog/examples

I'll copy-paste to _examples

Some users rely on this example as a starting point to their
applications. This commit fixes a data race that could cause issues in
any code that relied on the example as base.

Related to #72

Signed-off-by: Aitor Perez Cedres <aitor.perez@broadcom.com>
@lukebakken lukebakken self-requested a review May 7, 2024 18:22
Copy link
Contributor

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

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

@Zerpet let me know what you think of _examples/client/client.go

Copy link
Contributor Author

@Zerpet Zerpet left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@Zerpet Zerpet merged commit 0338738 into main May 8, 2024
7 checks passed
@Zerpet Zerpet deleted the fix/data-race-example branch May 8, 2024 10:27
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.

Data race in the client example
2 participants