Moved the destructor block->release to after the cancel().
This commit is contained in:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user