Moved the destructor block->release to after the cancel().

This commit is contained in:
Robert Osfield
2004-03-13 16:29:29 +00:00
parent 0368717e3e
commit 3223a87935

View File

@@ -45,9 +45,6 @@ DatabasePager::DatabasePager()
DatabasePager::~DatabasePager()
{
// release the frameBlock and _fileRequestListEmptyBlock incase its holding up thread cancelation.
_frameBlock->release();
_fileRequestListEmptyBlock->release();
//std::cout<<"DatabasePager::~DatabasePager()"<<std::endl;
if( isRunning() )
@@ -57,6 +54,10 @@ DatabasePager::~DatabasePager()
cancel();
//join();
// release the frameBlock and _fileRequestListEmptyBlock incase its holding up thread cancelation.
_frameBlock->release();
_fileRequestListEmptyBlock->release();
// then wait for the the thread to stop running.
while(isRunning())
{