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

Mention concurrency-safety properties in doc comments #1664

Open
varungandhi-src opened this issue Oct 31, 2024 · 0 comments
Open

Mention concurrency-safety properties in doc comments #1664

varungandhi-src opened this issue Oct 31, 2024 · 0 comments

Comments

@varungandhi-src
Copy link

Hello, thanks for your work on this library. I noticed that the types such as Registry as well as interfaces like Registerer don't mention anything around what the expected behavior is when multiple goroutines call the same methods like Register.

Looking at the implementation, it seems like the expectation is that all of a Registerer's methods should be concurrency-safe (and any custom implementations should respect this contract) since a Registerer is meant to be a global object.

It would be helpful as a downstream user to document the concurrency-safety guarantees for core types and requirements for interfaces (or lack thereof, in case you want callers to use synchronization on top). I'd be happy to submit a PR to do this if there is consensus on what the docs ought to say.

@dosubot dosubot bot added the enhancement label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant