diff options
author | Joe George <joe@zeroc.com> | 2017-05-02 13:58:41 -0400 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2017-05-02 15:42:34 -0400 |
commit | cd472ddf8bd8a9c2bcfc80e988e6db450ea7dbf9 (patch) | |
tree | 5dbc0bfc43e2c195ab7e7d819e1914611f943f1d /cpp/test/IceUtil/thread/CountDownLatchTest.cpp | |
parent | Removed trailing whitespace generated by slice2js (diff) | |
download | ice-cd472ddf8bd8a9c2bcfc80e988e6db450ea7dbf9.tar.bz2 ice-cd472ddf8bd8a9c2bcfc80e988e6db450ea7dbf9.tar.xz ice-cd472ddf8bd8a9c2bcfc80e988e6db450ea7dbf9.zip |
Remove trailing whitespace
Diffstat (limited to 'cpp/test/IceUtil/thread/CountDownLatchTest.cpp')
-rw-r--r-- | cpp/test/IceUtil/thread/CountDownLatchTest.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/cpp/test/IceUtil/thread/CountDownLatchTest.cpp b/cpp/test/IceUtil/thread/CountDownLatchTest.cpp index 32af5700bba..1e4c752c6ad 100644 --- a/cpp/test/IceUtil/thread/CountDownLatchTest.cpp +++ b/cpp/test/IceUtil/thread/CountDownLatchTest.cpp @@ -24,7 +24,7 @@ static const int magic = 0xbeef; class CountDownLatchTestThread : public Thread { public: - + CountDownLatchTestThread(CountDownLatch& latch, int& val, bool takeOne) : _latch(latch), _val(val), @@ -33,18 +33,18 @@ public: } virtual void run() - { + { if(_takeOne) { _latch.countDown(); } - + if(_latch.getCount() == 0) { test(_val == magic); } - + _latch.await(); test(_latch.getCount() == 0); test(_val == magic); @@ -53,7 +53,7 @@ public: private: CountDownLatch& _latch; - int& _val; + int& _val; bool _takeOne; }; @@ -81,7 +81,7 @@ CountDownLatchTest::run() t1[i] = new CountDownLatchTestThread(latch, val, false); t1[i]->start(); } - + // // Sleep a little bit, and check count // @@ -97,33 +97,33 @@ CountDownLatchTest::run() t2[i] = new CountDownLatchTestThread(latch, val, true); t2[i]->start(); } - + // // Sleep until count == 1 // do { ThreadControl::sleep(Time::milliSeconds(100)); - + for(i = 0; i < wave1Count; i++) { test(t1[i]->isAlive()); } - + for(i = 0; i < fullCount - 1; i++) { test(t2[i]->isAlive()); } } while(latch.getCount() > 1); - + // // Set val and release last count // val = magic; latch.countDown(); test(latch.getCount() == 0); - + // // Join them all // @@ -136,9 +136,9 @@ CountDownLatchTest::run() { t2[i]->getThreadControl().join(); } - + test(latch.getCount() == 0); - + const int wave2Count = 4; ThreadPtr t3[wave2Count]; for(i = 0; i < wave2Count; i++) @@ -147,7 +147,7 @@ CountDownLatchTest::run() t3[i]->start(); } test(latch.getCount() == 0); - + for(i = 0; i < wave2Count; i++) { t3[i]->getThreadControl().join(); |