diff -r 5af6c74cd793 -r af6ec97d9189 kerneltest/e32test/benchmark/thread.cpp --- a/kerneltest/e32test/benchmark/thread.cpp Wed Jun 23 11:59:44 2010 +0100 +++ b/kerneltest/e32test/benchmark/thread.cpp Wed Jun 23 12:52:28 2010 +0100 @@ -165,8 +165,10 @@ BM_ERROR(r, r == KErrNone); child.Logon(st); BMProgram::SetAbsPriority(RThread(), KBMPriorityLow); + TRequestStatus threadRunning; + child.Rendezvous(threadRunning); child.Resume(); - User::After(1000); // Give the child thread a chance to run - killing it too earlier can leave the heap locked + User::WaitForRequest(threadRunning); // Wait for the thread to run before killing it. BMProgram::SetAbsPriority(RThread(), KBMPriorityHigh); TBMTicks t1; ::bmTimer.Stamp(&t1); @@ -183,6 +185,7 @@ TInt Thread::KillingChild(TAny*) { + RThread::Rendezvous(KErrNone); User::WaitForAnyRequest(); return KErrNone; }