equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
36 Init(aName, RunFunctor, &aFunctor, aAutoResume); |
36 Init(aName, RunFunctor, &aFunctor, aAutoResume); |
37 } |
37 } |
38 |
38 |
39 TTestThread::~TTestThread() |
39 TTestThread::~TTestThread() |
40 { |
40 { |
41 //RTest::CloseHandleAndWaitForDestruction(iThread); |
|
42 iThread.Close(); |
41 iThread.Close(); |
43 } |
42 } |
44 |
43 |
45 void TTestThread::Resume() |
44 void TTestThread::Resume() |
46 { |
45 { |
86 |
85 |
87 |
86 |
88 CTest::~CTest() |
87 CTest::~CTest() |
89 { |
88 { |
90 iName.Close(); |
89 iName.Close(); |
|
90 } |
|
91 |
|
92 void CTest::SetupL() |
|
93 { |
91 } |
94 } |
92 |
95 |
93 void CTest::operator()() |
96 void CTest::operator()() |
94 { |
97 { |
95 for(TInt i=0; i<iIterations; i++) |
98 for(TInt i=0; i<iIterations; i++) |
137 RPointerArray<CTest> testArray; |
140 RPointerArray<CTest> testArray; |
138 RPointerArray<TTestThread> threadArray; |
141 RPointerArray<TTestThread> threadArray; |
139 |
142 |
140 for(TInt i=0; i<aNumberOfThreads; i++) |
143 for(TInt i=0; i<aNumberOfThreads; i++) |
141 { |
144 { |
142 //test.Next(_L("Create test thread")); |
145 test.Next(_L("Create test thread")); |
143 CTest* newTest = aTest.Clone(); |
146 CTest* newTest = aTest.Clone(); |
144 test_NotNull(newTest); |
147 test_NotNull(newTest); |
145 |
148 |
146 TTestThread* thread = new TTestThread(aTest.Name(), *newTest); |
149 TTestThread* thread = new TTestThread(aTest.Name(), *newTest); |
147 test_NotNull(thread); |
150 test_NotNull(thread); |