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

server: Use atomic types for some svr peer fields. #3237

Merged
merged 1 commit into from
May 4, 2024

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Apr 30, 2024

This updates a couple of cases of server peer data fields protected by an individual mutex to make use of the newer atomic types introduced in Go 1.19 instead.

This is desirable since atomic types are both simpler to use and more efficient when the data being protected does not require additional logic in the critical section as is the case for the updated fields.

@davecgh davecgh added this to the 1.9.0 milestone Apr 30, 2024
This updates a couple of cases of server peer data fields protected by
an individual mutex to make use of the newer atomic types introduced in
Go 1.19 instead.

This is desirable since atomic types are both simpler to use and more
efficient when the data being protected does not require additional
logic in the critical section as is the case for the updated fields.
@davecgh davecgh force-pushed the server_more_atomic_types branch from 9e686aa to 180eff2 Compare May 4, 2024 02:14
@davecgh davecgh merged commit 180eff2 into decred:master May 4, 2024
2 checks passed
@davecgh davecgh deleted the server_more_atomic_types branch May 4, 2024 02:28
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.

2 participants