projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No-op: remove all trailing whitespace.
[dcpomatic.git]
/
src
/
lib
/
job_manager.cc
diff --git
a/src/lib/job_manager.cc
b/src/lib/job_manager.cc
index b5b64a77eccc9d9f000d8512ee3a2101142a059b..f31a00a18b33f0bce674f0406b06197f8fbea691 100644
(file)
--- a/
src/lib/job_manager.cc
+++ b/
src/lib/job_manager.cc
@@
-40,7
+40,7
@@
JobManager::JobManager ()
, _last_active_jobs (false)
, _scheduler (new boost::thread (boost::bind (&JobManager::scheduler, this)))
{
, _last_active_jobs (false)
, _scheduler (new boost::thread (boost::bind (&JobManager::scheduler, this)))
{
-
+
}
JobManager::~JobManager ()
}
JobManager::~JobManager ()
@@
-64,7
+64,7
@@
JobManager::add (shared_ptr<Job> j)
}
emit (boost::bind (boost::ref (JobAdded), weak_ptr<Job> (j)));
}
emit (boost::bind (boost::ref (JobAdded), weak_ptr<Job> (j)));
-
+
return j;
}
return j;
}
@@
-98,7
+98,7
@@
JobManager::errors () const
}
return false;
}
return false;
-}
+}
void
JobManager::scheduler ()
void
JobManager::scheduler ()
@@
-112,21
+112,21
@@
JobManager::scheduler ()
if (_terminate) {
return;
}
if (_terminate) {
return;
}
-
+
for (list<shared_ptr<Job> >::iterator i = _jobs.begin(); i != _jobs.end(); ++i) {
if (!(*i)->finished ()) {
active_jobs = true;
}
for (list<shared_ptr<Job> >::iterator i = _jobs.begin(); i != _jobs.end(); ++i) {
if (!(*i)->finished ()) {
active_jobs = true;
}
-
+
if ((*i)->running ()) {
/* Something is already happening */
break;
}
if ((*i)->running ()) {
/* Something is already happening */
break;
}
-
+
if ((*i)->is_new()) {
(*i)->start ();
if ((*i)->is_new()) {
(*i)->start ();
-
+
/* Only start one job at once */
break;
}
/* Only start one job at once */
break;
}