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

Make TX_PROGRESS_LOCK atomic #88

Merged
merged 1 commit into from
Oct 14, 2024
Merged

Make TX_PROGRESS_LOCK atomic #88

merged 1 commit into from
Oct 14, 2024

Conversation

panleone
Copy link
Member

Locking a Mutex is a slow operation that involves system calls. Since we only need to synchronize a single float variable, using an atomic is better. Also we get rid of lazy_static, that makes the first initialization slower.

@panleone panleone added the enhancement New feature or request label Oct 11, 2024
@panleone panleone requested a review from Duddino October 11, 2024 12:27
@panleone panleone self-assigned this Oct 11, 2024
Copy link
Member

@Duddino Duddino left a comment

Choose a reason for hiding this comment

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

utACK

@Duddino Duddino merged commit 72dacf1 into master Oct 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants