From c9267a37515cd5f4cd30e4c544b0a15604e4032c Mon Sep 17 00:00:00 2001 From: apo Date: Mon, 12 Dec 2005 08:01:53 +0000 Subject: [PATCH] Apply debug --- src/VVTK/VVTK_ImageWriterMgr.cxx | 4 +--- src/VVTK/VVTK_ImageWriterMgr.h | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) 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; -- 2.39.2