From e64cc1c9f007a2654c6f6cba7110584ed460da05 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 25 Dec 2022 00:54:41 +0100 Subject: [PATCH] Cleanup: rename _empty_condition -> _schedule_condition --- src/lib/job_manager.cc | 18 +++++++++--------- src/lib/job_manager.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/job_manager.cc b/src/lib/job_manager.cc index 2b4e87299..5504251b0 100644 --- a/src/lib/job_manager.cc +++ b/src/lib/job_manager.cc @@ -75,7 +75,7 @@ JobManager::~JobManager () { boost::mutex::scoped_lock lm (_mutex); _terminate = true; - _empty_condition.notify_all (); + _schedule_condition.notify_all(); } try { @@ -90,7 +90,7 @@ JobManager::add (shared_ptr j) { boost::mutex::scoped_lock lm (_mutex); _jobs.push_back (j); - _empty_condition.notify_all (); + _schedule_condition.notify_all(); } emit (boost::bind(boost::ref(JobAdded), weak_ptr(j))); @@ -107,7 +107,7 @@ JobManager::add_after (shared_ptr after, shared_ptr j) auto i = find (_jobs.begin(), _jobs.end(), after); DCPOMATIC_ASSERT (i != _jobs.end()); _jobs.insert (i, j); - _empty_condition.notify_all (); + _schedule_condition.notify_all(); } emit (boost::bind(boost::ref(JobAdded), weak_ptr(j))); @@ -183,7 +183,7 @@ JobManager::scheduler () } } - _empty_condition.wait (lm); + _schedule_condition.wait(lm); } } @@ -197,7 +197,7 @@ JobManager::job_finished () _last_active_job = optional(); } - _empty_condition.notify_all (); + _schedule_condition.notify_all(); } @@ -250,7 +250,7 @@ JobManager::analyse_audio ( job = make_shared (film, playlist, from_zero); connection = job->Finished.connect (ready); _jobs.push_back (job); - _empty_condition.notify_all (); + _schedule_condition.notify_all (); } emit (boost::bind (boost::ref (JobAdded), weak_ptr (job))); @@ -285,7 +285,7 @@ JobManager::analyse_subtitles ( job = make_shared(film, content); connection = job->Finished.connect (ready); _jobs.push_back (job); - _empty_condition.notify_all (); + _schedule_condition.notify_all (); } emit (boost::bind(boost::ref(JobAdded), weak_ptr(job))); @@ -304,7 +304,7 @@ JobManager::increase_priority (shared_ptr job) swap(*iter, *std::prev(iter)); } - _empty_condition.notify_all(); + _schedule_condition.notify_all(); emit(boost::bind(boost::ref(JobsReordered))); } @@ -321,7 +321,7 @@ JobManager::decrease_priority (shared_ptr job) swap(*iter, *std::next(iter)); } - _empty_condition.notify_all(); + _schedule_condition.notify_all(); emit(boost::bind(boost::ref(JobsReordered))); } diff --git a/src/lib/job_manager.h b/src/lib/job_manager.h index 6802b5115..7b48e79f2 100644 --- a/src/lib/job_manager.h +++ b/src/lib/job_manager.h @@ -99,7 +99,7 @@ private: void job_finished (); mutable boost::mutex _mutex; - boost::condition _empty_condition; + boost::condition _schedule_condition; /** List of jobs in the order that they will be executed */ std::list> _jobs; std::list _connections; -- 2.30.2