Changeset e2f31d3
- Timestamp:
- Aug 11, 2025, 5:45:18 PM (3 months ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- aeec58
- Parents:
- 2c3ae5
- git-author:
- Frederik Heber <frederik.heber@…> (07/13/25 21:53:12)
- git-committer:
- Frederik Heber <frederik.heber@…> (08/11/25 17:45:18)
- Location:
- ThirdParty/JobMarket/src/JobMarket
- Files:
-
- 4 edited
-
FragmentScheduler.cpp (modified) (1 diff)
-
Pool/PoolGuard.cpp (modified) (3 diffs)
-
Pool/PoolGuard.hpp (modified) (5 diffs)
-
Pool/WorkerPool.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ThirdParty/JobMarket/src/JobMarket/FragmentScheduler.cpp
r2c3ae5 re2f31d3 71 71 boost::bind(&FragmentQueue::resubmitJob, boost::ref(JobsQueue), _1), 72 72 boost::bind(&FragmentQueue::isResultPresent, boost::cref(JobsQueue), _1), 73 pool.getPoolOfWorkers(), 73 74 OpQueue), 74 75 shutdown_thread(NULL) -
ThirdParty/JobMarket/src/JobMarket/Pool/PoolGuard.cpp
r2c3ae5 re2f31d3 44 44 const boost::function<void (const JobId_t)> _resubmitJobfunction, 45 45 const boost::function<bool (const JobId_t)> _checkResultPresentfunction, 46 const Pool_t& _poolOfWorkers, 46 47 OperationQueue &_OpQueue) : 47 48 CheckAtNextInterval(_guardFromStart), … … 51 52 resubmitJobfunction(_resubmitJobfunction), 52 53 checkResultPresentfunction(_checkResultPresentfunction), 54 PoolOfWorkers(_poolOfWorkers), 53 55 OpQueue(_OpQueue), 54 56 connection(_connection), … … 103 105 CheckWorker(*iter); 104 106 } 105 LOG(1, "INFO: Checking on " << CurrentIdleWorkerList.size() << " idle workers."); 106 for(std::set<WorkerAddress>::const_iterator iter = CurrentIdleWorkerList.begin(); 107 iter != CurrentIdleWorkerList.end(); ++iter) { 108 CheckWorker(*iter); 107 LOG(1, "INFO: Checking on " << PoolOfWorkers.size() << " all other workers."); 108 for(Pool_t::const_iterator iter = PoolOfWorkers.begin(); 109 iter != PoolOfWorkers.end(); ++iter) { 110 if (currentworkers.find(*iter) == currentworkers.end()) { 111 CheckWorker(*iter); 112 } 109 113 } 110 114 } else { -
ThirdParty/JobMarket/src/JobMarket/Pool/PoolGuard.hpp
r2c3ae5 re2f31d3 37 37 class PoolGuard { 38 38 public: 39 //!> set of worker addresses 40 typedef std::set<WorkerAddress> Pool_t; 41 39 42 /** Constructor for PoolGuard 40 43 * … … 46 49 * @param _resubmitJobfunction bound function to resubmit job by its JobId_t 47 50 * @param _checkResultPresentfunction bound function to check whether a job's result by its JobId_t is present 51 * @param _poolOfWorkers pool of all workers for general check alives 48 52 * @param _OpQueue access to operation queue for placing CheckAliveWorkerOperations 49 53 */ … … 56 60 const boost::function<void (const JobId_t)> _resubmitJobfunction, 57 61 const boost::function<bool (const JobId_t)> _checkResultPresentfunction, 62 const Pool_t& _poolOfWorkers, 58 63 OperationQueue &_OpQueue 59 64 ); … … 101 106 */ 102 107 void addBusyWorker(const WorkerAddress address, const JobId_t id); 108 109 /** Informs PoolGuard about a new idle worker. 110 * 111 * @param address address of worker 112 */ 113 void addIdleWorker(const WorkerAddress address); 103 114 104 115 /** Informs PoolGuard that a busy worker has finished. … … 154 165 155 166 //!> set of idle working workers 156 std::set<WorkerAddress> CurrentIdleWorkerList;167 const Pool_t& PoolOfWorkers; 157 168 158 169 //!> reference to OperationQueue for pushing CheckAliveWorkerOperation -
ThirdParty/JobMarket/src/JobMarket/Pool/WorkerPool.hpp
r2c3ae5 re2f31d3 69 69 typedef std::vector<std::pair<std::string, std::string> > WorkerList_t; 70 70 WorkerList_t getListOfIdleWorkers() const; 71 //!> typedef for the pool of workers being a set to keep only unique addresses 72 typedef std::set<WorkerAddress> Pool_t; 73 const Pool_t& getPoolOfWorkers() const 74 { 75 return pool; 76 } 71 77 72 78 /** Return the number of busy workers. … … 121 127 122 128 private: 123 //!> typedef for the pool of workers being a set to keep only unique addresses124 typedef std::set<WorkerAddress> Pool_t;125 126 private:127 129 //!> FragmentScheduler needs access to removeAllWorkers() 128 130 friend class FragmentScheduler;
Note:
See TracChangeset
for help on using the changeset viewer.
