Files
modern-cpp-tutorial/code/7/7.7.is.lock.free.cpp
2019-07-19 18:33:06 +02:00

23 lines
398 B
C++

//
// 7.7.is.lock.free.cpp
// chapter 7 parallelism and concurrency
// modern c++ tutorial
//
// created by changkun at changkun.de
// https://github.com/changkun/modern-cpp-tutorial
//
#include <atomic>
#include <iostream>
struct A {
float x;
int y;
long long z;
};
int main() {
std::atomic<A> a;
std::cout << std::boolalpha << a.is_lock_free() << std::endl;
return 0;
}