diff options
author | Bernard Normier <bernard@zeroc.com> | 2012-10-23 16:19:38 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2012-10-23 16:19:38 -0400 |
commit | ada25bad3511a359eb28cf48f018d6a42e166f10 (patch) | |
tree | 430749f887a1c6f708c2d4a23b3e3ec4ef18ef2c /cpp/test/IceUtil/condvar/WorkQueue.cpp | |
parent | Ruby 1.8 fix (diff) | |
download | ice-ada25bad3511a359eb28cf48f018d6a42e166f10.tar.bz2 ice-ada25bad3511a359eb28cf48f018d6a42e166f10.tar.xz ice-ada25bad3511a359eb28cf48f018d6a42e166f10.zip |
Fixed ICE-4855: expand tabs to space (8) for .php, .cpp, .h, .java and .cs files
Diffstat (limited to 'cpp/test/IceUtil/condvar/WorkQueue.cpp')
-rw-r--r-- | cpp/test/IceUtil/condvar/WorkQueue.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/cpp/test/IceUtil/condvar/WorkQueue.cpp b/cpp/test/IceUtil/condvar/WorkQueue.cpp index 7d093b7279e..e3f91c6a396 100644 --- a/cpp/test/IceUtil/condvar/WorkQueue.cpp +++ b/cpp/test/IceUtil/condvar/WorkQueue.cpp @@ -28,21 +28,21 @@ public: void decrement() { Monitor<Mutex>::Lock lock(*this); - assert(_count > 0); - --_count; - if(_count == 0) - { - notifyAll(); - } + assert(_count > 0); + --_count; + if(_count == 0) + { + notifyAll(); + } } void waitZero() { Monitor<Mutex>::Lock lock(*this); - while(_count > 0) - { - wait(); - } + while(_count > 0) + { + wait(); + } } private: @@ -80,7 +80,7 @@ public: { Monitor<Mutex>::Lock lock(*this); _terminate = true; - notifyAll(); + notifyAll(); } bool @@ -105,10 +105,10 @@ public: assert(!_q.empty()); ret = _q.front(); - if(ret % 100 == 0) - { - cout << "." << flush; - } + if(ret % 100 == 0) + { + cout << "." << flush; + } _q.pop_front(); return true; } @@ -126,16 +126,16 @@ public: // empty. if(_q.empty()) { - assert(_terminate); + assert(_terminate); return -1; } assert(!_q.empty()); int ret = _q.front(); - if(ret % 100 == 0) - { - cout << "." << flush; - } + if(ret % 100 == 0) + { + cout << "." << flush; + } _q.pop_front(); return ret; } @@ -158,18 +158,18 @@ public: virtual void run() { - _cd->decrement(); + _cd->decrement(); while(true) { int res = 0; - if(_poll) - { - _q->timedGet(res, Time::milliSeconds(10)); - } - else - { - res = _q->get(); - } + if(_poll) + { + _q->timedGet(res, Time::milliSeconds(10)); + } + else + { + res = _q->get(); + } if(res == -1) { return; @@ -196,14 +196,14 @@ public: virtual void run() { - _cd->decrement(); + _cd->decrement(); // Forever if(_v == 0) { while(true) { _q->put(_v++); - ThreadControl::yield(); + ThreadControl::yield(); } } else |