Mar 27, 2024

[C++] compare_exchange_weak / compare_exchange_strong and why spuriously fail happens

reference:
compare_exchange_weak / compare_exchange_strong

compare_exchange_strong; no spuriously fail


compare_exchange_weak; spuriously fail due to using timed lock; compare_exchange_weak is useful inside a loop;



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.