FITFLOP
Home

compare-and-swap (1 post)


posts by category not found!

Is std::atomic<std::weak_ptr<>>::compare_exchange_* guaranteed to work if the underlying pointer is expired?

The Curious Case of std atomic std weak ptr compare exchange and Expired Pointers Lets delve into the intriguing behavior of std atomic std weak ptr compare exc

2 min read 05-10-2024 59
Is std::atomic<std::weak_ptr<>>::compare_exchange_* guaranteed to work if the underlying pointer is expired?
Is std::atomic<std::weak_ptr<>>::compare_exchange_* guaranteed to work if the underlying pointer is expired?