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

examples/tide: Remove unnecessary Mutex #55

Merged
merged 1 commit into from
Mar 25, 2022

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented Mar 22, 2022

There is no need for mutable access to the Registry once all metrics
have been registered. Encoding the registered metrics does not require a
mutable reference.

With that in mind, an Arc is good enough. There is no need for a
Mutex.

Signed-off-by: Max Inden mail@max-inden.de

There is no need for mutable access to the `Registry` once all metrics
have been registered. Encoding the registered metrics does not require a
mutable reference.

With that in mind, an `Arc` is good enough. There is no need for a
`Mutex`.

Signed-off-by: Max Inden <mail@max-inden.de>
@mxinden mxinden merged commit a458c03 into prometheus:master Mar 25, 2022
ackintosh pushed a commit to ackintosh/client_rust that referenced this pull request Aug 27, 2022
There is no need for mutable access to the `Registry` once all metrics
have been registered. Encoding the registered metrics does not require a
mutable reference.

With that in mind, an `Arc` is good enough. There is no need for a
`Mutex`.

Signed-off-by: Max Inden <mail@max-inden.de>
Signed-off-by: ackintosh <sora.akatsuki@gmail.com>
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.

None yet

1 participant