From 604e478f527a922dd17781f822ec4c48ef868e4b Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 4 Sep 2003 19:45:55 +0000 Subject: [PATCH] Moved testCancel() to end of loop as per TXP pager code. --- src/osgDB/DatabasePager.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/osgDB/DatabasePager.cpp b/src/osgDB/DatabasePager.cpp index 24b83774a..1413faf3f 100644 --- a/src/osgDB/DatabasePager.cpp +++ b/src/osgDB/DatabasePager.cpp @@ -195,12 +195,9 @@ void DatabasePager::run() // by keeping deleted texture objects around for 10 seconds after being deleted. osg::Texture::getTextureObjectManager()->setExpiryDelay(10.0f); - while(true) + do { - // test to see if we need to exit. - testCancel(); - // // delete any children if required. // @@ -296,7 +293,7 @@ void DatabasePager::run() // go to sleep till our the next time our thread gets scheduled. YieldCurrentThread(); - } + } while (!testCancel()); cancel(); join();