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:
@@ -120,13 +120,9 @@ void QuicktimeImageStream::quit(bool wiatForThreadToExit)
|
||||
OSG_DEBUG<<"Sending quit"<<this<<std::endl;
|
||||
setCmd(THREAD_QUIT);
|
||||
|
||||
if (wiatForThreadToExit)
|
||||
if (isRunning() && wiatForThreadToExit)
|
||||
{
|
||||
while(isRunning())
|
||||
{
|
||||
OSG_DEBUG<<"Waiting for QuicktimeImageStream to quit"<<this<<std::endl;
|
||||
OpenThreads::Thread::YieldCurrentThread();
|
||||
}
|
||||
join();
|
||||
OSG_DEBUG<<"QuicktimeImageStream has quit"<<this<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user