mcslee: being nitpicky ensuring consistent coding style
Summary: no tabs, conditionals with spaces around them, etc
Reviewed By: thrift style rules
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665122 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/concurrency/ThreadManager.cpp b/lib/cpp/src/concurrency/ThreadManager.cpp
index 7d78edb..1260e5a 100644
--- a/lib/cpp/src/concurrency/ThreadManager.cpp
+++ b/lib/cpp/src/concurrency/ThreadManager.cpp
@@ -248,8 +248,8 @@
/* If we have a pending task max and we just dropped below it, wakeup any
thread that might be blocked on add. */
- if(manager_->pendingTaskCountMax_ != 0 &&
- manager_->tasks_.size() == manager_->pendingTaskCountMax_ - 1) {
+ if (manager_->pendingTaskCountMax_ != 0 &&
+ manager_->tasks_.size() == manager_->pendingTaskCountMax_ - 1) {
manager_->workerMonitor_.notify();
}
}
@@ -419,11 +419,11 @@
throw IllegalStateException();
}
- if(pendingTaskCountMax_ > 0 && (tasks_.size() >= pendingTaskCountMax_)) {
+ if (pendingTaskCountMax_ > 0 && (tasks_.size() >= pendingTaskCountMax_)) {
- if(canSleep()) {
+ if (canSleep()) {
- while(pendingTaskCountMax_ > 0 && tasks_.size() >= pendingTaskCountMax_) {
+ while (pendingTaskCountMax_ > 0 && tasks_.size() >= pendingTaskCountMax_) {
monitor_.wait(timeout);
}
} else {
@@ -449,7 +449,7 @@
class SimpleThreadManager : public ThreadManager::Impl {
-public:
+ public:
SimpleThreadManager(size_t workerCount=4, size_t pendingTaskCountMax=0) :
workerCount_(workerCount),
pendingTaskCountMax_(pendingTaskCountMax),
@@ -462,7 +462,7 @@
addWorker(workerCount_);
}
-private:
+ private:
const size_t workerCount_;
const size_t pendingTaskCountMax_;
bool firstTime_;