Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15ed5da8 authored by Fyodor Kyslov's avatar Fyodor Kyslov Committed by Android (Google) Code Review
Browse files

Merge "ultrahdr: signal all threads that no further jobs will be queued" into udc-dev

parents d9227711 d39fb082
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -534,7 +534,7 @@ bool JobQueue::dequeueJob(size_t& rowStart, size_t& rowEnd) {
      if (mQueuedAllJobs) {
        return false;
      } else {
        mCv.wait(lock);
        mCv.wait_for(lock, std::chrono::milliseconds(100));
      }
    } else {
      auto it = mJobs.begin();
@@ -557,6 +557,8 @@ void JobQueue::enqueueJob(size_t rowStart, size_t rowEnd) {
void JobQueue::markQueueForEnd() {
  std::unique_lock<std::mutex> lock{mMutex};
  mQueuedAllJobs = true;
  lock.unlock();
  mCv.notify_all();
}

void JobQueue::reset() {