diff options
author | Mark Spruiell <mes@zeroc.com> | 2008-06-03 19:32:20 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2008-06-03 19:32:20 -0700 |
commit | 3d649bed4328992f41f567136025f58a019a5159 (patch) | |
tree | 470be901fbbfe5c6cd4269884412b0d36b48dc92 /cppe/test/IceE/thread/StartTest.cpp | |
parent | local interface fixes for slice2javae (diff) | |
download | ice-3d649bed4328992f41f567136025f58a019a5159.tar.bz2 ice-3d649bed4328992f41f567136025f58a019a5159.tar.xz ice-3d649bed4328992f41f567136025f58a019a5159.zip |
Various Ice-E fixes:
- Bug fix in slice2javae for local interfaces/classes
- Added Ice.LocalObjectHolder
- Reviewed Java/C++ demos and aligned with Ice
- Source code clean up (removed tabs, etc.)
Diffstat (limited to 'cppe/test/IceE/thread/StartTest.cpp')
-rw-r--r-- | cppe/test/IceE/thread/StartTest.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/cppe/test/IceE/thread/StartTest.cpp b/cppe/test/IceE/thread/StartTest.cpp index fc19b8e1907..5545b1a737b 100644 --- a/cppe/test/IceE/thread/StartTest.cpp +++ b/cppe/test/IceE/thread/StartTest.cpp @@ -32,8 +32,8 @@ public: virtual void run() { - IceUtil::Mutex::Lock sync(threadCountMutex); - --threadCount; + IceUtil::Mutex::Lock sync(threadCountMutex); + --threadCount; } }; @@ -55,8 +55,8 @@ StartTest::run() control.join(); try { - t->start(); - test(false); + t->start(); + test(false); } catch(const ThreadStartedException&) { @@ -69,39 +69,39 @@ StartTest::run() #ifdef _WIN32_WCE for(int i = 0; i < 50; i++) { - for(int j = 0; j < 5; j++) - { - { - IceUtil::Mutex::Lock sync(threadCountMutex); - ++threadCount; - } - Thread* t = new StartTestThread; - t->start().detach(); - } + for(int j = 0; j < 5; j++) + { + { + IceUtil::Mutex::Lock sync(threadCountMutex); + ++threadCount; + } + Thread* t = new StartTestThread; + t->start().detach(); + } - // Wait for the threads to all terminate. I don't want to use - // a monitor here, since monitor hasn't been tested yet. - while(true) - { - { - IceUtil::Mutex::Lock sync(threadCountMutex); - if(threadCount == 0) - { - break; - } - } - ThreadControl::sleep(Time::milliSeconds(5)); - } + // Wait for the threads to all terminate. I don't want to use + // a monitor here, since monitor hasn't been tested yet. + while(true) + { + { + IceUtil::Mutex::Lock sync(threadCountMutex); + if(threadCount == 0) + { + break; + } + } + ThreadControl::sleep(Time::milliSeconds(5)); + } } #else for(int i = 0; i < 50; i++) { - for(int j = 0; j < 50; j++) - { - Thread* t = new StartTestThread; - t->start().detach(); - } - ThreadControl::sleep(Time::milliSeconds(5)); + for(int j = 0; j < 50; j++) + { + Thread* t = new StartTestThread; + t->start().detach(); + } + ThreadControl::sleep(Time::milliSeconds(5)); } #endif } |