projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More pixel formats.
[dcpomatic.git]
/
src
/
lib
/
job_manager.h
diff --git
a/src/lib/job_manager.h
b/src/lib/job_manager.h
index d1d33cfc2ce7e7dc3ac4693d579d7309e0ec30e5..cc1c1d28fc20b9250e101c4b7251bf10e9faf2e7 100644
(file)
--- a/
src/lib/job_manager.h
+++ b/
src/lib/job_manager.h
@@
-23,24
+23,24
@@
#include <list>
#include <boost/thread/mutex.hpp>
#include <list>
#include <boost/thread/mutex.hpp>
+#include <boost/signals2.hpp>
class Job;
/** @class JobManager
* @brief A simple scheduler for jobs.
class Job;
/** @class JobManager
* @brief A simple scheduler for jobs.
- *
- * JobManager simply keeps a list of pending jobs, and assumes that all the jobs
- * are sufficiently CPU intensive that there is no point running them in parallel;
- * so jobs are just run one after the other.
*/
class JobManager
{
public:
*/
class JobManager
{
public:
-
void
add (boost::shared_ptr<Job>);
+
boost::shared_ptr<Job>
add (boost::shared_ptr<Job>);
void add_after (boost::shared_ptr<Job> after, boost::shared_ptr<Job> j);
std::list<boost::shared_ptr<Job> > get () const;
bool work_to_do () const;
void add_after (boost::shared_ptr<Job> after, boost::shared_ptr<Job> j);
std::list<boost::shared_ptr<Job> > get () const;
bool work_to_do () const;
+ bool errors () const;
+
+ boost::signals2::signal<void (bool)> ActiveJobsChanged;
static JobManager* instance ();
static JobManager* instance ();
@@
-51,5
+51,7
@@
private:
mutable boost::mutex _mutex;
std::list<boost::shared_ptr<Job> > _jobs;
mutable boost::mutex _mutex;
std::list<boost::shared_ptr<Job> > _jobs;
+ bool _last_active_jobs;
+
static JobManager* _instance;
};
static JobManager* _instance;
};