using std::atomic to replace boost::atomic