MCPcopy Create free account
hub / github.com/colmap/colmap / Pop

Method Pop

src/colmap/util/threading.h:427–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425
426template <typename T>
427typename JobQueue<T>::Job JobQueue<T>::Pop() {
428 std::unique_lock<std::mutex> lock(mutex_);
429 while (jobs_.empty() && !stop_) {
430 push_condition_.wait(lock);
431 }
432 if (stop_) {
433 return Job();
434 } else {
435 Job job(std::move(jobs_.front()));
436 jobs_.pop();
437 pop_condition_.notify_one();
438 if (jobs_.empty()) {
439 empty_condition_.notify_all();
440 }
441 return job;
442 }
443}
444
445template <typename T>
446void JobQueue<T>::Wait() {

Callers

nothing calls this directly

Calls 2

JobClass · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected