projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bbd536
)
Don't run more than one job at once.
author
Carl Hetherington
<cth@carlh.net>
Wed, 10 Oct 2012 14:47:22 +0000
(15:47 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 10 Oct 2012 14:47:22 +0000
(15:47 +0100)
src/lib/job_manager.cc
patch
|
blob
|
history
diff --git
a/src/lib/job_manager.cc
b/src/lib/job_manager.cc
index 562c887de9b57479c75f702928ac2ae6aec5d313..2db91a177cc08c194644e7b35efc7095e577cddd 100644
(file)
--- a/
src/lib/job_manager.cc
+++ b/
src/lib/job_manager.cc
@@
-95,6
+95,11
@@
JobManager::scheduler ()
{
boost::mutex::scoped_lock lm (_mutex);
for (list<shared_ptr<Job> >::iterator i = _jobs.begin(); i != _jobs.end(); ++i) {
+ if ((*i)->running ()) {
+ /* Something is already happening */
+ break;
+ }
+
if ((*i)->is_new()) {
shared_ptr<Job> r = (*i)->required ();
if (!r || r->finished_ok ()) {