From: apo Date: Mon, 12 Dec 2005 08:01:53 +0000 (+0000) Subject: Apply debug X-Git-Tag: TG-D5-38-2003_D2005-20-12~41 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c9267a37515cd5f4cd30e4c544b0a15604e4032c;p=modules%2Fvisu.git Apply debug --- diff --git a/src/VVTK/VVTK_ImageWriterMgr.cxx b/src/VVTK/VVTK_ImageWriterMgr.cxx index 68b6d163..bc9d364e 100755 --- a/src/VVTK/VVTK_ImageWriterMgr.cxx +++ b/src/VVTK/VVTK_ImageWriterMgr.cxx @@ -98,10 +98,8 @@ VVTK_ImageWriterMgr for(size_t anId = 0, anEnd = myThreads.size(); anId < anEnd; anId++){ VVTK_ImageWriter* anImageWriter = myThreads[anId]; - while(!anImageWriter->finished()) - sleep(100); + anImageWriter->wait(); delete anImageWriter; } - myThreads.clear(); } diff --git a/src/VVTK/VVTK_ImageWriterMgr.h b/src/VVTK/VVTK_ImageWriterMgr.h index c016edc6..81ca97fb 100755 --- a/src/VVTK/VVTK_ImageWriterMgr.h +++ b/src/VVTK/VVTK_ImageWriterMgr.h @@ -52,8 +52,9 @@ class VVTK_ImageWriterMgr void Stop(); - protected: typedef std::vector TWriterThreads; + + protected: TWriterThreads myThreads; QSemaphore* mySemaphore;