Mercurial > hg > orthanc
comparison Core/JobsEngine/JobsEngine.h @ 3786:3801435e34a1 SylvainRouquette/fix-issue169-95b752c
integration Orthanc-1.6.0->SylvainRouquette
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 19 Mar 2020 11:48:30 +0100 |
parents | 56f2397f027a |
children |
comparison
equal
deleted
inserted
replaced
3785:763533d6dd67 | 3786:3801435e34a1 |
---|---|
1 /** | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
4 * Department, University Hospital of Liege, Belgium | 4 * Department, University Hospital of Liege, Belgium |
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium | 5 * Copyright (C) 2017-2020 Osimis S.A., Belgium |
6 * | 6 * |
7 * This program is free software: you can redistribute it and/or | 7 * This program is free software: you can redistribute it and/or |
8 * modify it under the terms of the GNU General Public License as | 8 * modify it under the terms of the GNU General Public License as |
9 * published by the Free Software Foundation, either version 3 of the | 9 * published by the Free Software Foundation, either version 3 of the |
10 * License, or (at your option) any later version. | 10 * License, or (at your option) any later version. |
33 | 33 |
34 #pragma once | 34 #pragma once |
35 | 35 |
36 #include "JobsRegistry.h" | 36 #include "JobsRegistry.h" |
37 | 37 |
38 #include "../Compatibility.h" | |
39 | |
38 #include <boost/thread.hpp> | 40 #include <boost/thread.hpp> |
39 | 41 |
40 namespace Orthanc | 42 namespace Orthanc |
41 { | 43 { |
42 class JobsEngine | 44 class JobsEngine : public boost::noncopyable |
43 { | 45 { |
44 private: | 46 private: |
45 enum State | 47 enum State |
46 { | 48 { |
47 State_Setup, | 49 State_Setup, |
50 State_Done | 52 State_Done |
51 }; | 53 }; |
52 | 54 |
53 boost::mutex stateMutex_; | 55 boost::mutex stateMutex_; |
54 State state_; | 56 State state_; |
55 std::auto_ptr<JobsRegistry> registry_; | 57 std::unique_ptr<JobsRegistry> registry_; |
56 boost::thread retryHandler_; | 58 boost::thread retryHandler_; |
57 unsigned int threadSleep_; | 59 unsigned int threadSleep_; |
58 std::vector<boost::thread*> workers_; | 60 std::vector<boost::thread*> workers_; |
59 | 61 |
60 bool IsRunning(); | 62 bool IsRunning(); |