Skip to content

Commit

Permalink
remove more locks
Browse files Browse the repository at this point in the history
  • Loading branch information
cldellow committed Oct 5, 2024
1 parent 18f3829 commit 01caf7f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/mbtiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ void MBTiles::flushPendingStatements() {
pendingStatements2->pop_back();
}

std::lock_guard<std::mutex> lock(pendingStatementsMutex);
pendingStatements1.swap(pendingStatements2);
}

Expand Down Expand Up @@ -181,15 +180,8 @@ void MBTiles::openForReading(string &filename) {
std::string uri = "file:";
uri += filename;
uri += "?immutable=1&mode=ro";
//db.init(uri.c_str(), SQLITE_OPEN_READONLY | SQLITE_OPEN_URI | SQLITE_OPEN_NOMUTEX);
db.init(uri.c_str(), SQLITE_OPEN_READONLY | SQLITE_OPEN_URI);
db.init(uri.c_str(), SQLITE_OPEN_READONLY | SQLITE_OPEN_URI | SQLITE_OPEN_NOMUTEX);
this->filename = filename;

/*
db << "pragma compile_options" >> [&](string str) {
std::cout << str << std::endl;
};
*/
}

void MBTiles::readBoundingBox(double &minLon, double &maxLon, double &minLat, double &maxLat) {
Expand Down

0 comments on commit 01caf7f

Please sign in to comment.