diff --git a/lib/cpp/src/concurrency/Exception.h b/lib/cpp/src/concurrency/Exception.h
index 575a3ed..00e2649 100644
--- a/lib/cpp/src/concurrency/Exception.h
+++ b/lib/cpp/src/concurrency/Exception.h
@@ -21,16 +21,16 @@
 class IllegalStateException : public facebook::thrift::TException {};
 
 class TimedOutException : public facebook::thrift::TException {
-public:                                            
+public:
   TimedOutException():TException("TimedOutException"){};
-  TimedOutException(const std::string& message ) : 
+  TimedOutException(const std::string& message ) :
     TException(message) {}
 };
 
 class TooManyPendingTasksException : public facebook::thrift::TException {
-public:                                            
+public:
   TooManyPendingTasksException():TException("TooManyPendingTasksException"){};
-  TooManyPendingTasksException(const std::string& message ) : 
+  TooManyPendingTasksException(const std::string& message ) :
     TException(message) {}
 };
 
diff --git a/lib/cpp/src/concurrency/Mutex.cpp b/lib/cpp/src/concurrency/Mutex.cpp
index a055656..87bfd35 100644
--- a/lib/cpp/src/concurrency/Mutex.cpp
+++ b/lib/cpp/src/concurrency/Mutex.cpp
@@ -11,9 +11,9 @@
 
 using boost::shared_ptr;
 
-namespace facebook { namespace thrift { namespace concurrency { 
+namespace facebook { namespace thrift { namespace concurrency {
 
-/** 
+/**
  * Implementation of Mutex class using POSIX mutex
  *
  * @author marc
@@ -54,7 +54,7 @@
 
 void Mutex::unlock() const { impl_->unlock(); }
 
-/** 
+/**
  * Implementation of ReadWriteMutex class using POSIX rw lock
  *
  * @author boz
@@ -86,7 +86,7 @@
 
   void release() const { pthread_rwlock_unlock(&rw_lock_); }
 
-private: 
+private:
   mutable pthread_rwlock_t rw_lock_;
   mutable bool initialized_;
 };
diff --git a/lib/cpp/src/concurrency/Mutex.h b/lib/cpp/src/concurrency/Mutex.h
index f3c7cd0..e176628 100644
--- a/lib/cpp/src/concurrency/Mutex.h
+++ b/lib/cpp/src/concurrency/Mutex.h
@@ -9,7 +9,7 @@
 
 #include <boost/shared_ptr.hpp>
 
-namespace facebook { namespace thrift { namespace concurrency { 
+namespace facebook { namespace thrift { namespace concurrency {
 
 /**
  * A simple mutex class
@@ -46,7 +46,7 @@
 
   // this releases both read and write locks
   virtual void release() const;
-   
+
 private:
 
   class impl;
@@ -54,7 +54,7 @@
 };
 
 class Guard {
- public: 
+ public:
   Guard(const Mutex& value) : mutex_(value) {
     mutex_.lock();
   }
@@ -67,20 +67,20 @@
 };
 
 class RWGuard {
-  public: 
+  public:
     RWGuard(const ReadWriteMutex& value, bool write = 0) : rw_mutex_(value) {
       if (write) {
         rw_mutex_.acquireWrite();
       } else {
         rw_mutex_.acquireRead();
       }
-    }  
+    }
     ~RWGuard() {
       rw_mutex_.release();
-    }  
-  private: 
+    }
+  private:
     const ReadWriteMutex& rw_mutex_;
-};  
+};
 
 
 // A little hack to prevent someone from trying to do "Guard(m);"
diff --git a/lib/cpp/src/concurrency/TimerManager.cpp b/lib/cpp/src/concurrency/TimerManager.cpp
index 4f77b2f..e3b7a89 100644
--- a/lib/cpp/src/concurrency/TimerManager.cpp
+++ b/lib/cpp/src/concurrency/TimerManager.cpp
@@ -12,7 +12,7 @@
 #include <iostream>
 #include <set>
 
-namespace facebook { namespace thrift { namespace concurrency { 
+namespace facebook { namespace thrift { namespace concurrency {
 
 using boost::shared_ptr;
 
@@ -38,10 +38,10 @@
   Task(shared_ptr<Runnable> runnable) :
     runnable_(runnable),
     state_(WAITING) {}
-  
+
   ~Task() {
   }
-  
+
   void run() {
     if (state_ == EXECUTING) {
       runnable_->run();
@@ -59,11 +59,11 @@
 class TimerManager::Dispatcher: public Runnable {
 
  public:
-  Dispatcher(TimerManager* manager) : 
+  Dispatcher(TimerManager* manager) :
     manager_(manager) {}
-  
+
   ~Dispatcher() {}
-  
+
   /**
    * Dispatcher entry point
    *
@@ -85,7 +85,7 @@
         Synchronized s(manager_->monitor_);
         task_iterator expiredTaskEnd;
         int64_t now = Util::currentTime();
-        while (manager_->state_ == TimerManager::STARTED && 
+        while (manager_->state_ == TimerManager::STARTED &&
                (expiredTaskEnd = manager_->taskMap_.upper_bound(now)) == manager_->taskMap_.begin()) {
           int64_t timeout = 0LL;
           if (!manager_->taskMap_.empty()) {
@@ -97,7 +97,7 @@
           } catch (TimedOutException &e) {}
           now = Util::currentTime();
         }
-        
+
         if (manager_->state_ == TimerManager::STARTED) {
           for (task_iterator ix = manager_->taskMap_.begin(); ix != expiredTaskEnd; ix++) {
             shared_ptr<TimerManager::Task> task = ix->second;
@@ -110,17 +110,17 @@
           manager_->taskMap_.erase(manager_->taskMap_.begin(), expiredTaskEnd);
         }
       }
-      
+
       for (std::set<shared_ptr<Task> >::iterator ix =  expiredTasks.begin(); ix != expiredTasks.end(); ix++) {
         (*ix)->run();
       }
-      
+
     } while (manager_->state_ == TimerManager::STARTED);
 
     {
       Synchronized s(manager_->monitor_);
       if (manager_->state_ == TimerManager::STOPPING) {
-        manager_->state_ = TimerManager::STOPPED; 
+        manager_->state_ = TimerManager::STOPPED;
         manager_->monitor_.notify();
       }
     }
@@ -143,7 +143,7 @@
 
   // If we haven't been explicitly stopped, do so now.  We don't need to grab
   // the monitor here, since stop already takes care of reentrancy.
-  
+
   if (state_ != STOPPED) {
     try {
       stop();
@@ -203,31 +203,31 @@
       taskMap_.erase(ix);
     }
 
-    // Remove dispatcher's reference to us. 
+    // Remove dispatcher's reference to us.
     dispatcher_->manager_ = NULL;
   }
 }
 
 shared_ptr<const ThreadFactory> TimerManager::threadFactory() const {
-  Synchronized s(monitor_); 
+  Synchronized s(monitor_);
   return threadFactory_;
 }
-      
+
 void TimerManager::threadFactory(shared_ptr<const ThreadFactory>  value) {
-  Synchronized s(monitor_); 
+  Synchronized s(monitor_);
   threadFactory_ = value;
 }
 
 size_t TimerManager::taskCount() const {
   return taskCount_;
 }
-      
+
 void TimerManager::add(shared_ptr<Runnable> task, int64_t timeout) {
   int64_t now = Util::currentTime();
   timeout += now;
 
   {
-    Synchronized s(monitor_); 
+    Synchronized s(monitor_);
     if (state_ != TimerManager::STARTED) {
       throw IllegalStateException();
     }
@@ -260,7 +260,7 @@
 
 
 void TimerManager::remove(shared_ptr<Runnable> task) {
-  Synchronized s(monitor_); 
+  Synchronized s(monitor_);
   if (state_ != TimerManager::STARTED) {
     throw IllegalStateException();
   }
diff --git a/lib/cpp/src/concurrency/TimerManager.h b/lib/cpp/src/concurrency/TimerManager.h
index 86900ce..6d2eae9 100644
--- a/lib/cpp/src/concurrency/TimerManager.h
+++ b/lib/cpp/src/concurrency/TimerManager.h
@@ -15,13 +15,13 @@
 #include <map>
 #include <time.h>
 
-namespace facebook { namespace thrift { namespace concurrency { 
+namespace facebook { namespace thrift { namespace concurrency {
 
 /**
- * Timer Manager 
- * 
+ * Timer Manager
+ *
  * This class dispatches timer tasks when they fall due.
- *  
+ *
  * @author marc
  * @version $Id:$
  */
@@ -38,7 +38,7 @@
   virtual void threadFactory(boost::shared_ptr<const ThreadFactory> value);
 
   /**
-   * Starts the timer manager service 
+   * Starts the timer manager service
    *
    * @throws IllegalArgumentException Missing thread factory attribute
    */
@@ -53,7 +53,7 @@
 
   /**
    * Adds a task to be executed at some time in the future by a worker thread.
-   * 
+   *
    * @param task The task to execute
    * @param timeout Time in milliseconds to delay before executing task
    */
@@ -61,14 +61,14 @@
 
   /**
    * Adds a task to be executed at some time in the future by a worker thread.
-   * 
+   *
    * @param task The task to execute
    * @param timeout Absolute time in the future to execute task.
-   */ 
+   */
   virtual void add(boost::shared_ptr<Runnable> task, const struct timespec& timeout);
 
   /**
-   * Removes a pending task 
+   * Removes a pending task
    *
    * @throws NoSuchTaskException Specified task doesn't exist. It was either
    *                             processed already or this call was made for a
@@ -86,7 +86,7 @@
     STOPPING,
     STOPPED
   };
-  
+
   virtual const STATE state() const;
 
  private:
diff --git a/lib/cpp/src/concurrency/Util.h b/lib/cpp/src/concurrency/Util.h
index 8a1ead3..3ebc0b1 100644
--- a/lib/cpp/src/concurrency/Util.h
+++ b/lib/cpp/src/concurrency/Util.h
@@ -17,7 +17,7 @@
 #include <sys/time.h>
 #endif // defined(HAVE_CLOCK_GETTIME)
 
-namespace facebook { namespace thrift { namespace concurrency { 
+namespace facebook { namespace thrift { namespace concurrency {
 
 /**
  * Utility methods
@@ -26,7 +26,7 @@
  * and other common platform-dependent concurrency operations.
  * It should not be included in API headers for other concurrency library
  * headers, since it will, by definition, pull in all sorts of horrid
- * platform dependent crap.  Rather it should be inluded directly in 
+ * platform dependent crap.  Rather it should be inluded directly in
  * concurrency library implementation source.
  *
  * @author marc
@@ -47,7 +47,7 @@
    * @param time or duration in milliseconds
    */
   static void toTimespec(struct timespec& result, int64_t value) {
-    result.tv_sec = value / MS_PER_S; // ms to s   
+    result.tv_sec = value / MS_PER_S; // ms to s
     result.tv_nsec = (value % MS_PER_S) * NS_PER_MS; // ms to ns
   }
 
diff --git a/lib/cpp/src/concurrency/test/TimerManagerTests.h b/lib/cpp/src/concurrency/test/TimerManagerTests.h
index bd959cd..13e3ef8 100644
--- a/lib/cpp/src/concurrency/test/TimerManagerTests.h
+++ b/lib/cpp/src/concurrency/test/TimerManagerTests.h
@@ -17,7 +17,7 @@
 using namespace facebook::thrift::concurrency;
 
 /**
- * ThreadManagerTests class 
+ * ThreadManagerTests class
  *
  * @author marc
  * @version $Id:$
@@ -30,8 +30,8 @@
 
   class Task: public Runnable {
    public:
-    
-    Task(Monitor& monitor, int64_t timeout) : 
+
+    Task(Monitor& monitor, int64_t timeout) :
       _timeout(timeout),
       _startTime(Util::currentTime()),
       _monitor(monitor),
@@ -56,15 +56,15 @@
       if(error < ERROR) {
         _success = true;
       }
-      
+
       _done = true;
 
-      std::cout << "\t\t\tTimerManagerTests::Task[" << this << "] done" << std::endl; //debug      
+      std::cout << "\t\t\tTimerManagerTests::Task[" << this << "] done" << std::endl; //debug
 
       {Synchronized s(_monitor);
         _monitor.notifyAll();
       }
-    }  
+    }
 
     int64_t _timeout;
     int64_t _startTime;
@@ -87,11 +87,11 @@
     {
 
       TimerManager timerManager;
-      
+
       timerManager.threadFactory(shared_ptr<PosixThreadFactory>(new PosixThreadFactory()));
-      
+
       timerManager.start();
-      
+
       assert(timerManager.state() == TimerManager::STARTED);
 
       shared_ptr<TimerManagerTests::Task> task = shared_ptr<TimerManagerTests::Task>(new TimerManagerTests::Task(_monitor, timeout));
@@ -125,6 +125,6 @@
 };
 
 const double TimerManagerTests::ERROR = .20;
-  
+
 }}}} // facebook::thrift::concurrency
 
