X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fjob_manager.h;h=4fe1e45d6b337302611d2c500721dfb719df0e88;hp=461688845c53b2d0dcf767332eb5886d212168a7;hb=bb949ec65adf95f4a2c7dd5ee7e97b9daaaf3d3f;hpb=39d51cddeeea82e602ab1925430b0dfb5752ac79 diff --git a/src/lib/job_manager.h b/src/lib/job_manager.h index 461688845..4fe1e45d6 100644 --- a/src/lib/job_manager.h +++ b/src/lib/job_manager.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2020 Carl Hetherington + Copyright (C) 2012-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,10 +18,12 @@ */ + /** @file src/job_manager.h * @brief A simple scheduler for jobs. */ + #include "signaller.h" #include #include @@ -29,23 +31,29 @@ #include #include + class Job; class Film; class Playlist; class Content; struct threed_test7; + extern bool wait_for_jobs (); + /** @class JobManager * @brief A simple scheduler for jobs. */ -class JobManager : public Signaller, public boost::noncopyable +class JobManager : public Signaller { public: + JobManager (JobManager const&) = delete; + JobManager& operator= (JobManager const&) = delete; + std::shared_ptr add (std::shared_ptr); std::shared_ptr add_after (std::shared_ptr after, std::shared_ptr j); - std::list > get () const; + std::list> get () const; bool work_to_do () const; bool errors () const; void increase_priority (std::shared_ptr); @@ -94,10 +102,10 @@ private: mutable boost::mutex _mutex; boost::condition _empty_condition; /** List of jobs in the order that they will be executed */ - std::list > _jobs; + std::list> _jobs; std::list _connections; - bool _terminate; - bool _paused; + bool _terminate = false; + bool _paused = false; std::shared_ptr _paused_job; boost::optional _last_active_job;