| 1372 | } |
| 1373 | |
| 1374 | void ScanRangeSharedState::UpdateRemainingScanRangeSubmissions(int32_t delta) { |
| 1375 | int new_val = remaining_scan_range_submissions_.Add(delta); |
| 1376 | DCHECK_GE(new_val, 0); |
| 1377 | if (!use_mt_scan_node_) return; |
| 1378 | if (new_val == 0) { |
| 1379 | // Last thread has added its ranges. Acquire lock so that no waiting thread misses the |
| 1380 | // last notify. |
| 1381 | std::unique_lock<std::mutex> l(scan_range_submission_lock_); |
| 1382 | } |
| 1383 | range_submission_cv_.NotifyAll(); |
| 1384 | } |
| 1385 | |
| 1386 | void ScanRangeSharedState::EnqueueScanRange( |
| 1387 | const vector<ScanRange*>& ranges, bool at_front) { |
no test coverage detected