diff --git a/lib/cpp/src/concurrency/BoostMonitor.cpp b/lib/cpp/src/concurrency/BoostMonitor.cpp
index da3f281..7a9b589 100644
--- a/lib/cpp/src/concurrency/BoostMonitor.cpp
+++ b/lib/cpp/src/concurrency/BoostMonitor.cpp
@@ -30,15 +30,20 @@
 #include <boost/scoped_ptr.hpp>
 #include <boost/thread.hpp>
 #include <boost/date_time/posix_time/posix_time.hpp>
+#include <boost/interprocess/sync/interprocess_mutex.hpp>
+#include <boost/interprocess/sync/interprocess_condition.hpp>
+#include <boost/interprocess/sync/scoped_lock.hpp>
 
 namespace apache { namespace thrift { namespace concurrency {
 
+using namespace boost::interprocess;
+
 /**
- * Monitor implementation using the boost thread library
+ * Monitor implementation using the boost interprocess library
  *
  * @version $Id:$
  */
-class Monitor::Impl : public boost::condition_variable {
+class Monitor::Impl : public interprocess_condition {
 
  public:
 
@@ -91,11 +96,11 @@
     }
 
     assert(mutex_);
-	boost::mutex* mutexImpl =
-      reinterpret_cast<boost::mutex*>(mutex_->getUnderlyingImpl());
+    interprocess_mutex* mutexImpl =
+      reinterpret_cast<interprocess_mutex*>(mutex_->getUnderlyingImpl());
     assert(mutexImpl);
 
-	boost::mutex::scoped_lock lock(*mutexImpl, boost::adopt_lock);
+	scoped_lock<interprocess_mutex> lock(*mutexImpl, accept_ownership_type());
 	int res = timed_wait(lock, boost::get_system_time()+boost::posix_time::milliseconds(timeout_ms)) ? 0 : ETIMEDOUT;
 	lock.release();
 	return res;
@@ -107,8 +112,8 @@
    */
   int waitForTime(const timespec* abstime) {
     assert(mutex_);
-    boost::mutex* mutexImpl =
-      reinterpret_cast<boost::mutex*>(mutex_->getUnderlyingImpl());
+    interprocess_mutex* mutexImpl =
+      reinterpret_cast<interprocess_mutex*>(mutex_->getUnderlyingImpl());
     assert(mutexImpl);
 
     struct timespec currenttime;
@@ -121,7 +126,7 @@
 	if(tv_nsec < 0)
 		tv_nsec = 0;
 
-	boost::mutex::scoped_lock lock(*mutexImpl, boost::adopt_lock);
+	scoped_lock<interprocess_mutex> lock(*mutexImpl, accept_ownership_type());
 	int res = timed_wait(lock, boost::get_system_time() +
 		boost::posix_time::seconds(tv_sec) +
 		boost::posix_time::microseconds(tv_nsec / 1000)
@@ -136,12 +141,12 @@
    */
   int waitForever() {
     assert(mutex_);
-    boost::mutex* mutexImpl =
-      reinterpret_cast<boost::mutex*>(mutex_->getUnderlyingImpl());
+    interprocess_mutex* mutexImpl =
+      reinterpret_cast<interprocess_mutex*>(mutex_->getUnderlyingImpl());
     assert(mutexImpl);
 
-	boost::mutex::scoped_lock lock(*mutexImpl, boost::adopt_lock);
-	((boost::condition_variable*)this)->wait(lock);
+	scoped_lock<interprocess_mutex> lock(*mutexImpl, accept_ownership_type());
+	((interprocess_condition*)this)->wait(lock);
 	lock.release();
     return 0;
   }
