You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was surprised that we don't have a recommendation on this in the concurrency section.
The gist of it is that you should prefer std::atomic<bool> by default. std::atomic_flag is guaranteed to be lock-free, but it also has a less usual API and is lock-free at all cost, even if that means doing something insanely costly like locking the entire memory bus.
The text was updated successfully, but these errors were encountered:
I was surprised that we don't have a recommendation on this in the concurrency section.
The gist of it is that you should prefer
std::atomic<bool>
by default.std::atomic_flag
is guaranteed to be lock-free, but it also has a less usual API and is lock-free at all cost, even if that means doing something insanely costly like locking the entire memory bus.The text was updated successfully, but these errors were encountered: