diff options
author | Benoit Foucher <benoit@zeroc.com> | 2008-06-06 11:39:41 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2008-06-06 11:39:41 +0200 |
commit | 966061fcb0e2ec4d5d7ed9c6c280eefb27209da7 (patch) | |
tree | 078246631fb864d9e908108d69917b18c6303c16 /cppe/test/IceE/thread/CreateTest.cpp | |
parent | Removed SL code (diff) | |
download | ice-966061fcb0e2ec4d5d7ed9c6c280eefb27209da7.tar.bz2 ice-966061fcb0e2ec4d5d7ed9c6c280eefb27209da7.tar.xz ice-966061fcb0e2ec4d5d7ed9c6c280eefb27209da7.zip |
Removed Ice-E
Diffstat (limited to 'cppe/test/IceE/thread/CreateTest.cpp')
-rw-r--r-- | cppe/test/IceE/thread/CreateTest.cpp | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/cppe/test/IceE/thread/CreateTest.cpp b/cppe/test/IceE/thread/CreateTest.cpp deleted file mode 100644 index c6ef0e58e6d..00000000000 --- a/cppe/test/IceE/thread/CreateTest.cpp +++ /dev/null @@ -1,80 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. -// -// This copy of Ice-E is licensed to you under the terms described in the -// ICEE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <IceE/DisableWarnings.h> -#include <IceE/IceE.h> - -#include <stdio.h> - -#include <CreateTest.h> -#include <TestCommon.h> - -using namespace std; -using namespace IceUtil; - -static const string createTestName("thread create"); - -class CreateTestThread : public Thread -{ -public: - - CreateTestThread() : - threadran(false) - { - } - - virtual void run() - { - threadran = true; - } - - bool threadran; -}; - -typedef Handle<CreateTestThread> CreateTestThreadPtr; - -CreateTest::CreateTest() : - TestBase(createTestName) -{ -} - -void -CreateTest::run() -{ - int nthreads = 4096; -#ifdef _WIN32_WCE - // - // 4096 threads takes forever to start on the WinCe emulator. - // - nthreads = 512; -#endif - for(int i = 0; i < nthreads ; ++i) - { - CreateTestThreadPtr t = new CreateTestThread(); - ThreadControl control = t->start(); - control.join(); - test(t->threadran); -#ifdef _WIN32_WCE - if((i % 32) == 0) - { - tprintf("."); - } -#else - if((i % 256) == 0) - { - char buf[5]; - sprintf(buf, "%04d", i); - tprintf("%s", buf); - } -#endif - } -#ifndef _WIN32_WCE - tprintf(" "); -#endif -} |