We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Not sure if it's an issue or not, but definitely a question... :)
If the 'compare_exchange_weak' call in the code below fails, the newTime would be incremented by timeNeeded multiple times. Is that the intent?
for (;;) { newTime += timeNeeded; if (newTime > now) { return false; } if (time_.compare_exchange_weak(oldTime, newTime, std::memory_order_relaxed, std::memory_order_relaxed)) { return true; } newTime = oldTime; }
The text was updated successfully, but these errors were encountered:
Never mind, understood. oldTime is copied to the newTime on the last line of the loop.
Sorry, something went wrong.
No branches or pull requests
Not sure if it's an issue or not, but definitely a question... :)
If the 'compare_exchange_weak' call in the code below fails, the newTime would be incremented by timeNeeded multiple times. Is that the intent?
The text was updated successfully, but these errors were encountered: