Skip to content

Commit

Permalink
close previous db-load job
Browse files Browse the repository at this point in the history
And not rely on job destructor, it seems that Qt may postpone
object deletion after deleteLater() invocation for very long time.
In such situation data are still loading and job is holding
database read-lock.
  • Loading branch information
Karry committed Jan 31, 2024
1 parent 7e7378e commit 5b62a91
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@ void PlaneMapRenderer::TriggerMapRendering(const MapViewStruct& request, size_t
{
QMutexLocker locker(&lock);
if (loadJob!=nullptr){
// TODO: check if job contains same tiles...
// TODO: check if job contains the same tiles...
loadJob->Close();
loadJob->deleteLater();
loadJob=nullptr;
}
Expand Down

0 comments on commit 5b62a91

Please sign in to comment.