#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 startAsync(); void startSync(); int assignJobList(std::shared_ptr &jobList); private: std::mutex currentJobList_m; std::shared_ptr currentJobList = NULL; std::vector> *fpgaVector; commFPGA* findAvailableFPGA(); void sendJob(std::shared_ptr &job); std::future result; int threadMain(); std::condition_variable hasJobList; void waitForJobList(); }; #endif