diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt
index 1ed0bfa..9ea82c3 100755
--- a/lib/cpp/CMakeLists.txt
+++ b/lib/cpp/CMakeLists.txt
@@ -103,14 +103,7 @@
 endif()
 
 # WITH_*THREADS selects which threading library to use
-if(WITH_BOOSTTHREADS)
-    set( thriftcpp_threads_SOURCES
-        src/thrift/concurrency/BoostThreadFactory.cpp
-        src/thrift/concurrency/BoostMonitor.cpp
-        src/thrift/concurrency/BoostMutex.cpp
-    )
-    list(APPEND SYSLIBS "${Boost_LIBRARIES}")
-elseif(UNIX AND NOT WITH_STDTHREADS)
+if(UNIX AND NOT WITH_STDTHREADS)
     if(ANDROID)
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
     else()
diff --git a/lib/cpp/Makefile.am b/lib/cpp/Makefile.am
index 83ccd9b..11d6b05 100755
--- a/lib/cpp/Makefile.am
+++ b/lib/cpp/Makefile.am
@@ -106,15 +106,9 @@
                        src/thrift/server/TThreadPoolServer.cpp \
                        src/thrift/server/TThreadedServer.cpp
 
-if WITH_BOOSTTHREADS
-libthrift_la_SOURCES += src/thrift/concurrency/BoostThreadFactory.cpp \
-                        src/thrift/concurrency/BoostMonitor.cpp \
-                        src/thrift/concurrency/BoostMutex.cpp
-else
 libthrift_la_SOURCES += src/thrift/concurrency/Mutex.cpp \
                         src/thrift/concurrency/Monitor.cpp \
                         src/thrift/concurrency/PosixThreadFactory.cpp
-endif
 
 libthriftnb_la_SOURCES = src/thrift/server/TNonblockingServer.cpp \
                          src/thrift/async/TEvhttpServer.cpp \
@@ -170,7 +164,6 @@
 
 include_concurrencydir = $(include_thriftdir)/concurrency
 include_concurrency_HEADERS = \
-                         src/thrift/concurrency/BoostThreadFactory.h \
                          src/thrift/concurrency/Exception.h \
                          src/thrift/concurrency/Mutex.h \
                          src/thrift/concurrency/Monitor.h \
diff --git a/lib/cpp/src/thrift/concurrency/BoostMonitor.cpp b/lib/cpp/src/thrift/concurrency/BoostMonitor.cpp
deleted file mode 100644
index ebfa0b9..0000000
--- a/lib/cpp/src/thrift/concurrency/BoostMonitor.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include <thrift/thrift-config.h>
-
-#include <thrift/concurrency/Monitor.h>
-#include <thrift/concurrency/Exception.h>
-#include <thrift/concurrency/Util.h>
-#include <thrift/transport/PlatformSocket.h>
-#include <thrift/stdcxx.h>
-
-#include <assert.h>
-#include <boost/thread.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
-
-namespace apache {
-namespace thrift {
-namespace concurrency {
-
-/**
- * Monitor implementation using the boost thread library
- *
- * @version $Id:$
- */
-class Monitor::Impl : public boost::condition_variable_any {
-
-public:
-  Impl() : ownedMutex_(new Mutex()), mutex_(NULL) { init(ownedMutex_.get()); }
-
-  Impl(Mutex* mutex) : mutex_(NULL) { init(mutex); }
-
-  Impl(Monitor* monitor) : mutex_(NULL) { init(&(monitor->mutex())); }
-
-  Mutex& mutex() { return *mutex_; }
-  void lock() { mutex().lock(); }
-  void unlock() { mutex().unlock(); }
-
-  /**
-   * Exception-throwing version of waitForTimeRelative(), called simply
-   * wait(int64) for historical reasons.  Timeout is in milliseconds.
-   *
-   * If the condition occurs,  this function returns cleanly; on timeout or
-   * error an exception is thrown.
-   */
-  void wait(int64_t timeout_ms) {
-    int result = waitForTimeRelative(timeout_ms);
-    if (result == THRIFT_ETIMEDOUT) {
-      throw TimedOutException();
-    } else if (result != 0) {
-      throw TException("Monitor::wait() failed");
-    }
-  }
-
-  /**
-   * Waits until the specified timeout in milliseconds for the condition to
-   * occur, or waits forever if timeout_ms == 0.
-   *
-   * Returns 0 if condition occurs, THRIFT_ETIMEDOUT on timeout, or an error code.
-   */
-  int waitForTimeRelative(int64_t timeout_ms) {
-    if (timeout_ms == 0LL) {
-      return waitForever();
-    }
-
-    assert(mutex_);
-    boost::timed_mutex* mutexImpl
-        = reinterpret_cast<boost::timed_mutex*>(mutex_->getUnderlyingImpl());
-    assert(mutexImpl);
-
-    boost::timed_mutex::scoped_lock lock(*mutexImpl, boost::adopt_lock);
-    int res
-        = timed_wait(lock, boost::get_system_time() + boost::posix_time::milliseconds(timeout_ms))
-              ? 0
-              : THRIFT_ETIMEDOUT;
-    lock.release();
-    return res;
-  }
-
-  /**
-   * Waits until the absolute time specified using struct THRIFT_TIMESPEC.
-   * Returns 0 if condition occurs, THRIFT_ETIMEDOUT on timeout, or an error code.
-   */
-  int waitForTime(const THRIFT_TIMESPEC* abstime) {
-    struct timeval temp;
-    temp.tv_sec = static_cast<long>(abstime->tv_sec);
-    temp.tv_usec = static_cast<long>(abstime->tv_nsec) / 1000;
-    return waitForTime(&temp);
-  }
-
-  /**
-   * Waits until the absolute time specified using struct timeval.
-   * Returns 0 if condition occurs, THRIFT_ETIMEDOUT on timeout, or an error code.
-   */
-  int waitForTime(const struct timeval* abstime) {
-    assert(mutex_);
-    boost::timed_mutex* mutexImpl = static_cast<boost::timed_mutex*>(mutex_->getUnderlyingImpl());
-    assert(mutexImpl);
-
-    struct timeval currenttime;
-    Util::toTimeval(currenttime, Util::currentTime());
-
-    long tv_sec = static_cast<long>(abstime->tv_sec - currenttime.tv_sec);
-    long tv_usec = static_cast<long>(abstime->tv_usec - currenttime.tv_usec);
-    if (tv_sec < 0)
-      tv_sec = 0;
-    if (tv_usec < 0)
-      tv_usec = 0;
-
-    boost::timed_mutex::scoped_lock lock(*mutexImpl, boost::adopt_lock);
-    int res = timed_wait(lock,
-                         boost::get_system_time() + boost::posix_time::seconds(tv_sec)
-                         + boost::posix_time::microseconds(tv_usec))
-                  ? 0
-                  : THRIFT_ETIMEDOUT;
-    lock.release();
-    return res;
-  }
-
-  /**
-   * Waits forever until the condition occurs.
-   * Returns 0 if condition occurs, or an error code otherwise.
-   */
-  int waitForever() {
-    assert(mutex_);
-    boost::timed_mutex* mutexImpl
-        = reinterpret_cast<boost::timed_mutex*>(mutex_->getUnderlyingImpl());
-    assert(mutexImpl);
-
-    boost::timed_mutex::scoped_lock lock(*mutexImpl, boost::adopt_lock);
-    ((boost::condition_variable_any*)this)->wait(lock);
-    lock.release();
-    return 0;
-  }
-
-  void notify() { notify_one(); }
-
-  void notifyAll() { notify_all(); }
-
-private:
-  void init(Mutex* mutex) { mutex_ = mutex; }
-
-  stdcxx::scoped_ptr<Mutex> ownedMutex_;
-  Mutex* mutex_;
-};
-
-Monitor::Monitor() : impl_(new Monitor::Impl()) {
-}
-Monitor::Monitor(Mutex* mutex) : impl_(new Monitor::Impl(mutex)) {
-}
-Monitor::Monitor(Monitor* monitor) : impl_(new Monitor::Impl(monitor)) {
-}
-
-Monitor::~Monitor() {
-  delete impl_;
-}
-
-Mutex& Monitor::mutex() const {
-  return const_cast<Monitor::Impl*>(impl_)->mutex();
-}
-
-void Monitor::lock() const {
-  const_cast<Monitor::Impl*>(impl_)->lock();
-}
-
-void Monitor::unlock() const {
-  const_cast<Monitor::Impl*>(impl_)->unlock();
-}
-
-void Monitor::wait(int64_t timeout) const {
-  const_cast<Monitor::Impl*>(impl_)->wait(timeout);
-}
-
-int Monitor::waitForTime(const THRIFT_TIMESPEC* abstime) const {
-  return const_cast<Monitor::Impl*>(impl_)->waitForTime(abstime);
-}
-
-int Monitor::waitForTime(const timeval* abstime) const {
-  return const_cast<Monitor::Impl*>(impl_)->waitForTime(abstime);
-}
-
-int Monitor::waitForTimeRelative(int64_t timeout_ms) const {
-  return const_cast<Monitor::Impl*>(impl_)->waitForTimeRelative(timeout_ms);
-}
-
-int Monitor::waitForever() const {
-  return const_cast<Monitor::Impl*>(impl_)->waitForever();
-}
-
-void Monitor::notify() const {
-  const_cast<Monitor::Impl*>(impl_)->notify();
-}
-
-void Monitor::notifyAll() const {
-  const_cast<Monitor::Impl*>(impl_)->notifyAll();
-}
-}
-}
-} // apache::thrift::concurrency
diff --git a/lib/cpp/src/thrift/concurrency/BoostMutex.cpp b/lib/cpp/src/thrift/concurrency/BoostMutex.cpp
deleted file mode 100644
index 4e556df..0000000
--- a/lib/cpp/src/thrift/concurrency/BoostMutex.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include <thrift/thrift-config.h>
-
-#include <thrift/concurrency/Mutex.h>
-#include <thrift/concurrency/Util.h>
-#include <thrift/Thrift.h>
-
-#include <cassert>
-#include <boost/thread.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
-
-namespace apache {
-namespace thrift {
-namespace concurrency {
-
-/**
- * Implementation of Mutex class using boost::timed_mutex
- *
- * Methods throw boost::lock_error on error.
- *
- * @version $Id:$
- */
-class Mutex::impl : public boost::timed_mutex {};
-
-Mutex::Mutex(Initializer init) : impl_(new Mutex::impl()) {
-  THRIFT_UNUSED_VARIABLE(init);
-}
-
-void* Mutex::getUnderlyingImpl() const {
-  return impl_.get();
-}
-
-void Mutex::lock() const {
-  impl_->lock();
-}
-
-bool Mutex::trylock() const {
-  return impl_->try_lock();
-}
-
-bool Mutex::timedlock(int64_t ms) const {
-  return impl_->timed_lock(boost::get_system_time() + boost::posix_time::milliseconds(ms));
-}
-
-void Mutex::unlock() const {
-  impl_->unlock();
-}
-
-void Mutex::DEFAULT_INITIALIZER(void* arg) {
-  THRIFT_UNUSED_VARIABLE(arg);
-}
-}
-}
-} // apache::thrift::concurrency
diff --git a/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp b/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
deleted file mode 100644
index d7d8d54..0000000
--- a/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include <thrift/thrift-config.h>
-
-#if USE_BOOST_THREAD
-
-#include <thrift/concurrency/BoostThreadFactory.h>
-#include <thrift/concurrency/Exception.h>
-#include <thrift/stdcxx.h>
-#include <cassert>
-
-#include <boost/thread.hpp>
-
-namespace apache {
-namespace thrift {
-
-using stdcxx::bind;
-using stdcxx::scoped_ptr;
-using stdcxx::shared_ptr;
-using stdcxx::weak_ptr;
-
-namespace concurrency {
-
-/**
- * The boost thread class.
- *
- * @version $Id:$
- */
-class BoostThread : public Thread {
-public:
-  enum STATE { uninitialized, starting, started, stopping, stopped };
-
-  static void* threadMain(void* arg);
-
-private:
-  scoped_ptr<boost::thread> thread_;
-  Monitor monitor_;
-  STATE state_;
-  weak_ptr<BoostThread> self_;
-  bool detached_;
-
-public:
-  BoostThread(bool detached, shared_ptr<Runnable> runnable)
-    : state_(uninitialized), detached_(detached) {
-    this->Thread::runnable(runnable);
-  }
-
-  ~BoostThread() {
-    if (!detached_ && thread_->joinable()) {
-      try {
-        join();
-      } catch (...) {
-        // We're really hosed.
-      }
-    }
-  }
-
-  STATE getState() const
-  {
-    Synchronized sync(monitor_);
-    return state_;
-  }
-
-  void setState(STATE newState)
-  {
-    Synchronized sync(monitor_);
-    state_ = newState;
-
-    // unblock start() with the knowledge that the thread has actually
-    // started running, which avoids a race in detached threads.
-    if (newState == started) {
-	  monitor_.notify();
-    }
-  }
-
-  void start() {
-    // Create reference
-    shared_ptr<BoostThread>* selfRef = new shared_ptr<BoostThread>();
-    *selfRef = self_.lock();
-
-    setState(starting);
-
-	Synchronized sync(monitor_);
-	
-    thread_.reset(new boost::thread(bind(threadMain, (void*)selfRef)));
-
-    if (detached_)
-      thread_->detach();
-    
-    // Wait for the thread to start and get far enough to grab everything
-    // that it needs from the calling context, thus absolving the caller
-    // from being required to hold on to runnable indefinitely.
-    monitor_.wait();
-  }
-
-  void join() {
-    if (!detached_ && getState() != uninitialized) {
-      thread_->join();
-    }
-  }
-
-  Thread::id_t getId() { return thread_.get() ? thread_->get_id() : boost::thread::id(); }
-
-  shared_ptr<Runnable> runnable() const { return Thread::runnable(); }
-
-  void runnable(shared_ptr<Runnable> value) { Thread::runnable(value); }
-
-  void weakRef(shared_ptr<BoostThread> self) {
-    assert(self.get() == this);
-    self_ = weak_ptr<BoostThread>(self);
-  }
-};
-
-void* BoostThread::threadMain(void* arg) {
-  shared_ptr<BoostThread> thread = *(shared_ptr<BoostThread>*)arg;
-  delete reinterpret_cast<shared_ptr<BoostThread>*>(arg);
-
-  thread->setState(started);
-  thread->runnable()->run();
-
-  if (thread->getState() != stopping && thread->getState() != stopped) {
-    thread->setState(stopping);
-  }
-  return (void*)0;
-}
-
-BoostThreadFactory::BoostThreadFactory(bool detached)
-  : ThreadFactory(detached) {
-}
-
-shared_ptr<Thread> BoostThreadFactory::newThread(shared_ptr<Runnable> runnable) const {
-  shared_ptr<BoostThread> result = shared_ptr<BoostThread>(new BoostThread(isDetached(), runnable));
-  result->weakRef(result);
-  runnable->thread(result);
-  return result;
-}
-
-Thread::id_t BoostThreadFactory::getCurrentThreadId() const {
-  return boost::this_thread::get_id();
-}
-}
-}
-} // apache::thrift::concurrency
-
-#endif // USE_BOOST_THREAD
diff --git a/lib/cpp/src/thrift/concurrency/BoostThreadFactory.h b/lib/cpp/src/thrift/concurrency/BoostThreadFactory.h
deleted file mode 100644
index bf11a70..0000000
--- a/lib/cpp/src/thrift/concurrency/BoostThreadFactory.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef _THRIFT_CONCURRENCY_BOOSTTHREADFACTORY_H_
-#define _THRIFT_CONCURRENCY_BOOSTTHREADFACTORY_H_ 1
-
-#include <thrift/concurrency/Monitor.h>
-#include <thrift/concurrency/Thread.h>
-#include <thrift/stdcxx.h>
-
-namespace apache {
-namespace thrift {
-namespace concurrency {
-
-/**
- * A thread factory to create posix threads
- *
- * @version $Id:$
- */
-class BoostThreadFactory : public ThreadFactory {
-
-public:
-  /**
-   * Boost thread factory.  All threads created by a factory are reference-counted
-   * via stdcxx::shared_ptr.  The factory guarantees that threads and the Runnable tasks they
-   * host will be properly cleaned up once the last strong reference to both is given up.
-   *
-   * Threads are created with the specified boost policy, priority, stack-size. A detachable thread
-   * is not joinable.
-   *
-   * By default threads are not joinable.
-   */
-
-  BoostThreadFactory(bool detached = true);
-
-  // From ThreadFactory;
-  stdcxx::shared_ptr<Thread> newThread(stdcxx::shared_ptr<Runnable> runnable) const;
-
-  // From ThreadFactory;
-  Thread::id_t getCurrentThreadId() const;
-};
-
-}
-}
-} // apache::thrift::concurrency
-
-#endif // #ifndef _THRIFT_CONCURRENCY_BOOSTTHREADFACTORY_H_
diff --git a/lib/cpp/src/thrift/concurrency/PlatformThreadFactory.h b/lib/cpp/src/thrift/concurrency/PlatformThreadFactory.h
index 545b572..99b4403 100644
--- a/lib/cpp/src/thrift/concurrency/PlatformThreadFactory.h
+++ b/lib/cpp/src/thrift/concurrency/PlatformThreadFactory.h
@@ -22,9 +22,7 @@
 
 // clang-format off
 #include <thrift/thrift-config.h>
-#if USE_BOOST_THREAD
-#  include <thrift/concurrency/BoostThreadFactory.h>
-#elif USE_STD_THREAD
+#if USE_STD_THREAD
 #  include <thrift/concurrency/StdThreadFactory.h>
 #else
 #  include <thrift/concurrency/PosixThreadFactory.h>
@@ -36,9 +34,7 @@
 namespace concurrency {
 
 // clang-format off
-#if USE_BOOST_THREAD
-  typedef BoostThreadFactory PlatformThreadFactory;
-#elif USE_STD_THREAD
+#if USE_STD_THREAD
   typedef StdThreadFactory PlatformThreadFactory;
 #else
   typedef PosixThreadFactory PlatformThreadFactory;
diff --git a/lib/cpp/src/thrift/concurrency/Thread.h b/lib/cpp/src/thrift/concurrency/Thread.h
index 788623b..7e2d251 100644
--- a/lib/cpp/src/thrift/concurrency/Thread.h
+++ b/lib/cpp/src/thrift/concurrency/Thread.h
@@ -25,9 +25,7 @@
 
 #include <thrift/thrift-config.h>
 
-#if USE_BOOST_THREAD
-#include <boost/thread.hpp>
-#elif USE_STD_THREAD
+#if USE_STD_THREAD
 #include <thread>
 #else
 #ifdef HAVE_PTHREAD_H
@@ -80,12 +78,7 @@
 class Thread {
 
 public:
-#if USE_BOOST_THREAD
-  typedef boost::thread::id id_t;
-
-  static inline bool is_current(id_t t) { return t == boost::this_thread::get_id(); }
-  static inline id_t get_current() { return boost::this_thread::get_id(); }
-#elif USE_STD_THREAD
+#if USE_STD_THREAD
   typedef std::thread::id id_t;
 
   static inline bool is_current(id_t t) { return t == std::this_thread::get_id(); }
diff --git a/lib/cpp/src/thrift/server/TNonblockingServer.cpp b/lib/cpp/src/thrift/server/TNonblockingServer.cpp
index 194d59f..1031ec0 100644
--- a/lib/cpp/src/thrift/server/TNonblockingServer.cpp
+++ b/lib/cpp/src/thrift/server/TNonblockingServer.cpp
@@ -1119,7 +1119,7 @@
   // Launch all the secondary IO threads in separate threads
   if (ioThreads_.size() > 1) {
     ioThreadFactory_.reset(new PlatformThreadFactory(
-#if !USE_BOOST_THREAD && !USE_STD_THREAD
+#if !USE_STD_THREAD
         PlatformThreadFactory::OTHER,  // scheduler
         PlatformThreadFactory::NORMAL, // priority
         1,                             // stack size (MB)
diff --git a/lib/cpp/src/thrift/windows/TWinsockSingleton.cpp b/lib/cpp/src/thrift/windows/TWinsockSingleton.cpp
index 2e0ccf5..d2683b0 100644
--- a/lib/cpp/src/thrift/windows/TWinsockSingleton.cpp
+++ b/lib/cpp/src/thrift/windows/TWinsockSingleton.cpp
@@ -28,13 +28,7 @@
 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 @@
 
 //------------------------------------------------------------------------------
 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 0eab6d4..50458a9 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:
   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 bc4aa42..a5f4457 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
diff --git a/lib/cpp/test/CMakeLists.txt b/lib/cpp/test/CMakeLists.txt
index 261382f..82d47a6 100644
--- a/lib/cpp/test/CMakeLists.txt
+++ b/lib/cpp/test/CMakeLists.txt
@@ -82,7 +82,7 @@
     TServerTransportTest.cpp
 )
 
-if(NOT WITH_BOOSTTHREADS AND NOT WITH_STDTHREADS AND NOT MSVC AND NOT MINGW)
+if(NOT WITH_STDTHREADS AND NOT MSVC AND NOT MINGW)
     list(APPEND UnitTest_SOURCES concurrency/MutexTest.cpp)
     list(APPEND UnitTest_SOURCES concurrency/RWMutexStarveTest.cpp)
 endif()
diff --git a/lib/cpp/test/Makefile.am b/lib/cpp/test/Makefile.am
index 4b9f77d..d645a65 100755
--- a/lib/cpp/test/Makefile.am
+++ b/lib/cpp/test/Makefile.am
@@ -135,11 +135,9 @@
 	TServerTransportTest.cpp \
 	TTransportCheckThrow.h
 
-if !WITH_BOOSTTHREADS
 UnitTests_SOURCES += \
   concurrency/MutexTest.cpp \
   concurrency/RWMutexStarveTest.cpp
-endif
 
 UnitTests_LDADD = \
   libtestgencpp.la \
diff --git a/lib/cpp/test/TNonblockingSSLServerTest.cpp b/lib/cpp/test/TNonblockingSSLServerTest.cpp
index 3e9700f..2efb140 100644
--- a/lib/cpp/test/TNonblockingSSLServerTest.cpp
+++ b/lib/cpp/test/TNonblockingSSLServerTest.cpp
@@ -221,7 +221,7 @@
 
     apache::thrift::stdcxx::scoped_ptr<apache::thrift::concurrency::ThreadFactory> threadFactory(
         new apache::thrift::concurrency::PlatformThreadFactory(
-#if !USE_BOOST_THREAD && !USE_STD_THREAD
+#if !USE_STD_THREAD
             concurrency::PlatformThreadFactory::OTHER, concurrency::PlatformThreadFactory::NORMAL,
             1,
 #endif
diff --git a/lib/cpp/test/TNonblockingServerTest.cpp b/lib/cpp/test/TNonblockingServerTest.cpp
index 63d8a04..5e10907 100644
--- a/lib/cpp/test/TNonblockingServerTest.cpp
+++ b/lib/cpp/test/TNonblockingServerTest.cpp
@@ -148,7 +148,7 @@
 
     shared_ptr<ThreadFactory> threadFactory(
         new PlatformThreadFactory(
-#if !USE_BOOST_THREAD && !USE_STD_THREAD
+#if !USE_STD_THREAD
             PlatformThreadFactory::OTHER, PlatformThreadFactory::NORMAL,
             1,
 #endif
diff --git a/lib/cpp/test/concurrency/ThreadManagerTests.h b/lib/cpp/test/concurrency/ThreadManagerTests.h
index 9ecd6ba..15a43ff 100644
--- a/lib/cpp/test/concurrency/ThreadManagerTests.h
+++ b/lib/cpp/test/concurrency/ThreadManagerTests.h
@@ -111,7 +111,7 @@
     shared_ptr<PlatformThreadFactory> threadFactory
         = shared_ptr<PlatformThreadFactory>(new PlatformThreadFactory(false));
 
-#if !USE_BOOST_THREAD && !USE_STD_THREAD
+#if !USE_STD_THREAD
     threadFactory->setPriority(PosixThreadFactory::HIGHEST);
 #endif
     threadManager->threadFactory(threadFactory);
@@ -260,7 +260,7 @@
       shared_ptr<PlatformThreadFactory> threadFactory
           = shared_ptr<PlatformThreadFactory>(new PlatformThreadFactory());
 
-#if !USE_BOOST_THREAD && !USE_STD_THREAD
+#if !USE_STD_THREAD
       threadFactory->setPriority(PosixThreadFactory::HIGHEST);
 #endif
       threadManager->threadFactory(threadFactory);
@@ -401,7 +401,7 @@
       return false;
     }
 
-#if !USE_BOOST_THREAD && !USE_STD_THREAD
+#if !USE_STD_THREAD
     // test once with a detached thread factory and once with a joinable thread factory
 
     shared_ptr<PosixThreadFactory> threadFactory
@@ -426,7 +426,7 @@
     shared_ptr<ThreadManager> threadManager = ThreadManager::newSimpleThreadManager(1);
     threadManager->threadFactory(threadFactory);
 
-#if !USE_BOOST_THREAD && !USE_STD_THREAD
+#if !USE_STD_THREAD
     threadFactory->setPriority(PosixThreadFactory::HIGHEST);
 
     // verify we cannot change the thread factory to one with the opposite detached setting
