atomic-swap Questions
3
Solved
Swapping two unique_ptrs is not guaranteed to be threadsafe.
std::unique_ptr<T> a, b;
std::swap(a, b); // not threadsafe
Since I need atomic pointer swaps and since I like the ownership ha...
Redness asked 17/3, 2013 at 12:43
3
Solved
Is in the new standard C++ atomic increment operation with the check preconditions before the incremented the value, that the atomic value was less than the specified value?
Can I do it easier and...
Walkout asked 8/12, 2012 at 13:55
2
Solved
Is there any way to implement a type of reference whose value can be exchanged with another atomically?
In Java we have AtomicReference which can be swapped with a local variable but not with an...
Graaf asked 25/1, 2011 at 21:31
2
Solved
I want to verify that my understanding is correct. This kind of thing is tricky so I'm almost sure I am missing something. I have a program consisting of a real-time thread and a non-real-time thre...
Thermel asked 19/3, 2010 at 15:15
1
© 2022 - 2024 — McMap. All rights reserved.