Mercurial > hg > orthanc
diff OrthancServer/Scheduler/ServerScheduler.cpp @ 2063:ed383e7a6753
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 04 Jul 2016 15:50:11 +0200 |
parents | b1291df2f780 |
children | 29689b30f9ae |
line wrap: on
line diff
--- a/OrthancServer/Scheduler/ServerScheduler.cpp Sat Jul 02 15:09:03 2016 +0200 +++ b/OrthancServer/Scheduler/ServerScheduler.cpp Mon Jul 04 15:50:11 2016 +0200 @@ -192,6 +192,11 @@ ServerScheduler::ServerScheduler(unsigned int maxJobs) : availableJob_(maxJobs) { + if (maxJobs == 0) + { + throw OrthancException(ErrorCode_ParameterOutOfRange); + } + finish_ = false; worker_ = boost::thread(Worker, this); }