comparison Core/JobsEngine/JobsEngine.h @ 2665:389d050a2e66 jobs

fix deadlock, speed up unit tests
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 08 Jun 2018 13:51:31 +0200
parents 441f23af9d89
children d26dd081df97
comparison
equal deleted inserted replaced
2664:a21b244efb37 2665:389d050a2e66
52 52
53 boost::mutex stateMutex_; 53 boost::mutex stateMutex_;
54 State state_; 54 State state_;
55 JobsRegistry registry_; 55 JobsRegistry registry_;
56 boost::thread retryHandler_; 56 boost::thread retryHandler_;
57 unsigned int threadSleep_;
57 std::vector<boost::thread*> workers_; 58 std::vector<boost::thread*> workers_;
58 59
59 bool IsRunning(); 60 bool IsRunning();
60 61
61 bool ExecuteStep(JobsRegistry::RunningJob& running, 62 bool ExecuteStep(JobsRegistry::RunningJob& running,
70 JobsEngine(); 71 JobsEngine();
71 72
72 ~JobsEngine(); 73 ~JobsEngine();
73 74
74 void SetWorkersCount(size_t count); 75 void SetWorkersCount(size_t count);
76
77 void SetThreadSleep(unsigned int sleep);
75 78
76 JobsRegistry& GetRegistry() 79 JobsRegistry& GetRegistry()
77 { 80 {
78 return registry_; 81 return registry_;
79 } 82 }