| 376 | } |
| 377 | |
| 378 | bool ClientPrefs::AddQueryToQueue(TQueryOp *query) |
| 379 | { |
| 380 | { |
| 381 | std::lock_guard<std::mutex> lock(queryLock); |
| 382 | if (!Database) |
| 383 | { |
| 384 | cachedQueries.push_back(query); |
| 385 | return false; |
| 386 | } |
| 387 | |
| 388 | if (!cachedQueries.empty()) |
| 389 | this->ProcessQueryCache(); |
| 390 | } |
| 391 | |
| 392 | query->SetDatabase(Database); |
| 393 | dbi->AddToThreadQueue(query, PrioQueue_Normal); |
| 394 | return true; |
| 395 | } |
| 396 | |
| 397 | void ClientPrefs::ProcessQueryCache() |
| 398 | { |
no test coverage detected