diff options
author | cyy <cyyever@outlook.com> | 2019-01-05 13:45:07 +0800 |
---|---|---|
committer | James E. King III <jking@apache.org> | 2019-01-07 08:11:37 -0500 |
commit | c109e019790a87ef1f874dfac3482ac45a57d3ab (patch) | |
tree | 5c010cc93d0c3ff0cd6c16e93595b69b46efe194 /lib/cpp/src/thrift/windows | |
parent | 83b65f06fa380ed94669bdb461344f4f6b591191 (diff) | |
download | thrift-c109e019790a87ef1f874dfac3482ac45a57d3ab.tar.gz |
remove boost::thread and boost::mutex code
Diffstat (limited to 'lib/cpp/src/thrift/windows')
-rw-r--r-- | lib/cpp/src/thrift/windows/TWinsockSingleton.cpp | 10 | ||||
-rw-r--r-- | lib/cpp/src/thrift/windows/TWinsockSingleton.h | 12 | ||||
-rw-r--r-- | lib/cpp/src/thrift/windows/config.h | 3 |
3 files changed, 0 insertions, 25 deletions
diff --git a/lib/cpp/src/thrift/windows/TWinsockSingleton.cpp b/lib/cpp/src/thrift/windows/TWinsockSingleton.cpp index 2e0ccf53a..d2683b08a 100644 --- a/lib/cpp/src/thrift/windows/TWinsockSingleton.cpp +++ b/lib/cpp/src/thrift/windows/TWinsockSingleton.cpp @@ -28,13 +28,7 @@ namespace thrift { namespace transport { TWinsockSingleton::instance_ptr TWinsockSingleton::instance_ptr_(NULL); -#if USE_BOOST_THREAD -boost::once_flag TWinsockSingleton::flags_ = BOOST_ONCE_INIT; -#elif USE_STD_THREAD std::once_flag TWinsockSingleton::flags_; -#else -#error For windows you must choose USE_BOOST_THREAD or USE_STD_THREAD -#endif //------------------------------------------------------------------------------ TWinsockSingleton::TWinsockSingleton(void) { @@ -55,11 +49,7 @@ TWinsockSingleton::~TWinsockSingleton(void) { //------------------------------------------------------------------------------ void TWinsockSingleton::create(void) { -#if USE_BOOST_THREAD - boost::call_once(init, flags_); -#elif USE_STD_THREAD std::call_once(flags_, init); -#endif } //------------------------------------------------------------------------------ diff --git a/lib/cpp/src/thrift/windows/TWinsockSingleton.h b/lib/cpp/src/thrift/windows/TWinsockSingleton.h index 0eab6d4ec..50458a937 100644 --- a/lib/cpp/src/thrift/windows/TWinsockSingleton.h +++ b/lib/cpp/src/thrift/windows/TWinsockSingleton.h @@ -33,13 +33,7 @@ // boost #include <boost/noncopyable.hpp> -#if USE_BOOST_THREAD -#include <boost/thread/once.hpp> -#elif USE_STD_THREAD #include <mutex> -#else -#error For windows you must choose USE_BOOST_THREAD or USE_STD_THREAD -#endif #include <thrift/stdcxx.h> @@ -70,13 +64,7 @@ private: private: static instance_ptr instance_ptr_; -#if USE_BOOST_THREAD - static boost::once_flag flags_; -#elif USE_STD_THREAD static std::once_flag flags_; -#else -#error Need a non-Boost non-C++11 way to track single initialization here. -#endif }; } } diff --git a/lib/cpp/src/thrift/windows/config.h b/lib/cpp/src/thrift/windows/config.h index bc4aa42f8..a5f44577d 100644 --- a/lib/cpp/src/thrift/windows/config.h +++ b/lib/cpp/src/thrift/windows/config.h @@ -31,9 +31,6 @@ // use std::thread in MSVC11 (2012) or newer and in MinGW #if (_MSC_VER >= 1700) || defined(__MINGW32__) #define USE_STD_THREAD 1 -#else -// otherwise use boost threads -#define USE_BOOST_THREAD 1 #endif // Something that defines PRId64 is required to build |