diff --git a/lib/cpp/src/thrift/server/TThreadPoolServer.h b/lib/cpp/src/thrift/server/TThreadPoolServer.h index a957b473d..121998c4d 100644 --- a/lib/cpp/src/thrift/server/TThreadPoolServer.h +++ b/lib/cpp/src/thrift/server/TThreadPoolServer.h @@ -20,7 +20,7 @@ #ifndef _THRIFT_SERVER_TTHREADPOOLSERVER_H_ #define _THRIFT_SERVER_TTHREADPOOLSERVER_H_ 1 -#include +#include #include #include @@ -90,8 +90,8 @@ protected: virtual void onClientDisconnected(TConnectedClient* pClient) /* override */; std::shared_ptr threadManager_; - boost::atomic timeout_; - boost::atomic taskExpiration_; + std::atomic timeout_; + std::atomic taskExpiration_; }; } diff --git a/lib/cpp/src/thrift/transport/TFileTransport.h b/lib/cpp/src/thrift/transport/TFileTransport.h index 4fbdd9ec6..6cc7bd24b 100644 --- a/lib/cpp/src/thrift/transport/TFileTransport.h +++ b/lib/cpp/src/thrift/transport/TFileTransport.h @@ -24,11 +24,10 @@ #include #include +#include #include #include -#include - #include #include #include @@ -347,11 +346,11 @@ private: // conditions used to block when the buffer is full or empty Monitor notFull_, notEmpty_; - boost::atomic closing_; + std::atomic closing_; // To keep track of whether the buffer has been flushed Monitor flushed_; - boost::atomic forceFlush_; + std::atomic forceFlush_; // Mutex that is grabbed when enqueueing and swapping the read/write buffers Mutex mutex_; diff --git a/lib/cpp/test/TServerIntegrationTest.cpp b/lib/cpp/test/TServerIntegrationTest.cpp index 372367912..7976c8bcf 100644 --- a/lib/cpp/test/TServerIntegrationTest.cpp +++ b/lib/cpp/test/TServerIntegrationTest.cpp @@ -18,8 +18,8 @@ */ #define BOOST_TEST_MODULE TServerIntegrationTest +#include #include -#include #include #include #include @@ -310,10 +310,10 @@ public: shared_ptr pProtocol(new TBinaryProtocol(pSocket)); ParentServiceClient client(pProtocol); pSocket->open(); - bStressConnectionCount.fetch_add(1, boost::memory_order_relaxed); + bStressConnectionCount.fetch_add(1, std::memory_order_relaxed); for (int i = 0; i < rand() % 1000; ++i) { client.incrementGeneration(); - bStressRequestCount.fetch_add(1, boost::memory_order_relaxed); + bStressRequestCount.fetch_add(1, std::memory_order_relaxed); } } } @@ -321,9 +321,9 @@ public: shared_ptr pServer; shared_ptr pEventHandler; shared_ptr pServerThread; - boost::atomic bStressDone; - boost::atomic_int64_t bStressConnectionCount; - boost::atomic_int64_t bStressRequestCount; + std::atomic bStressDone; + std::atomic bStressConnectionCount; + std::atomic bStressRequestCount; }; template