How to use std::atomic<>

后端 未结 4 1776
南笙
南笙 2021-01-30 09:25

I have a class that I want to use in different threads and I think I may be able to use std::atomic this way:

class A
{
    int x;

public:
    A()
         


        
4条回答
提交回复
热议问题