⚡ Build the skills to land top-paying quant jobs. Offer ends in --d --h --m --s-- days -- hours -- minutes -- seconds.
⚡ Build the skills to land top-paying quant jobs. Offer ends in 19d 08h 35m 26s19 days 8 hours 35 minutes 26 seconds.
Observe the code snippet below. What is the value returned by the load on data in thread 2?
std::atomic<bool> flag = false;
std::atomic<int> data = 0;
// Thread 1
data.store(42, std::memory_order_relaxed);
flag.store(true, std::memory_order_release);
// Thread 2
if (flag.load(std::memory_order_acquire)) {
std::cout << data.load(std::memory_order_relaxed);
}