Replaced use of while(isRunning()) { YieldCurrentThread(); } style loops with use of join() to avoid false positives being reported by valgrind when using the helgrind tool for thread debugging.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14460 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -158,17 +158,11 @@ int ImagePager::ImageThread::cancel()
|
||||
// _databasePagerThreadBlock->release();
|
||||
|
||||
// then wait for the the thread to stop running.
|
||||
while(isRunning())
|
||||
{
|
||||
// commenting out debug info as it was cashing crash on exit, presumable
|
||||
// due to osg::notify or std::cout destructing earlier than this destructor.
|
||||
// OSG_DEBUG<<"Waiting for DatabasePager to cancel"<<std::endl;
|
||||
OpenThreads::Thread::YieldCurrentThread();
|
||||
}
|
||||
join();
|
||||
|
||||
// _startThreadCalled = false;
|
||||
}
|
||||
//std::cout<<"DatabasePager::~DatabasePager() stopped running"<<std::endl;
|
||||
//std::cout<<"ImagePager::cancel() thread stopped running"<<std::endl;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user