MCPcopy Create free account
hub / github.com/docling-project/docling-parse / get_result

Method get_result

app/run_scaling.cpp:706–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

704 }
705
706 page_result get_result()
707 {
708 std::unique_lock<std::mutex> lock(results_mutex_);
709 results_available_.wait(lock, [this]() {
710 return not results_.empty() or active_workers_.load() == 0;
711 });
712
713 if(results_.empty())
714 {
715 page_result result;
716 result.success = false;
717 result.error_message = "no result available";
718 return result;
719 }
720
721 page_result result = std::move(results_.front());
722 results_.pop();
723 tasks_remaining_.fetch_sub(1);
724 lock.unlock();
725 results_consumed_.notify_one();
726 return result;
727 }
728
729 private:
730 const std::vector<scheduled_doc>& schedule_;

Callers

nothing calls this directly

Calls 3

frontMethod · 0.80
emptyMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected