# HG changeset patch # User Sebastien Jodogne # Date 1398333665 -7200 # Node ID a64ca424e0e24d362d621f76a28d7e1f73f62a59 # Parent 476febedc5161d2d5bd53f888f50be346ac299e9 fix test diff -r 476febedc516 -r a64ca424e0e2 UnitTestsSources/MultiThreading.cpp --- a/UnitTestsSources/MultiThreading.cpp Wed Apr 23 17:23:18 2014 +0200 +++ b/UnitTestsSources/MultiThreading.cpp Thu Apr 24 12:01:05 2014 +0200 @@ -796,10 +796,10 @@ }; -static void Tata(ServerScheduler* s, ServerJob* j) +static void Tata(ServerScheduler* s, ServerJob* j, bool* done) { #if 1 - for (;;) + while (!(*done)) { ListOfStrings l; s->GetListOfJobs(l); @@ -840,7 +840,8 @@ job.SetDescription("tutu"); - boost::thread t(Tata, &scheduler, &job); + bool done = false; + boost::thread t(Tata, &scheduler, &job, &done); //scheduler.Submit(job); @@ -856,5 +857,6 @@ //Toolbox::ServerBarrier(); //Toolbox::USleep(3000000); - //t.join(); + done = true; + t.join(); }