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

Improve write_database_queue::wait description and add [[nodiscard]] #4522

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

clemahieu
Copy link
Contributor

No description provided.

pwojcikdev
pwojcikdev previously approved these changes Mar 25, 2024
Copy link
Contributor

@pwojcikdev pwojcikdev left a comment

Choose a reason for hiding this comment

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

Blocks until we are at the head of the queue and blocks other waiters until write_guard goes out of scope

I'm having a bit of trouble understanding why this write_database_queue is needed in the first place, this description sounds like just acquiring a mutex.

@clemahieu
Copy link
Contributor Author

Added a better description. The write queue gives fair access to the exclusive database write transaction which is guarded by a mutex with no fairness guarantee.

@clemahieu clemahieu merged commit 9b0401d into nanocurrency:develop Mar 25, 2024
24 of 27 checks passed
@qwahzi qwahzi added this to the V27 milestone Mar 25, 2024
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.

3 participants