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

use atomic instead of mutex to allow multiple calls to disableLimitEnforcement #622

Closed
wants to merge 1 commit into from

Conversation

MichaelRawson
Copy link
Contributor

In #577 I failed to notice that FMB calls Timer::disableLimitEnforcement more than once for some reason. This causes FMB to hang on success (!). Oops.

Fix that by using an atomic flag rather than a mutex. This also seems more intuitive to me in retrospect.

@MichaelRawson
Copy link
Contributor Author

MichaelRawson commented Nov 25, 2024

After discussion with @quickbeam123 , probably std::mutex::try_lock is a better option. (or std::recursive_mutex)

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.

1 participant