#ifndef myWORKER_H #define myWORKER_H #include #include #include #include #include "jobList.hpp" #include "commFPGA.hpp" class Worker { public: Worker(std::vector> *fpgas); ~Worker(); void start(); int assignJobList(std::shared_ptr &jobList); private: std::mutex currentJobList_m; std::shared_ptr currentJobList = NULL; std::vector> *fpgaVector; commFPGA* findAvailableFPGA(); std::future result; int threadMain(); std::condition_variable hasJobList; void waitForJobList(); }; #endif