#pragma once #ifndef _ASYNCDOWNLOADMANAGER_HPP_ #define _ASYNCDOWNLOADMANAGER_HPP_ #include #include #include #include #include #define WORKER_COUNT 5 namespace bumbleBee { class AsyncDownloadManager { public: static void enqueue(std::string query) { static AsyncDownloadManager dl; std::thread th(&bumbleBee::AsyncDownloadManager::enqueueAsyncDL, &dl, query); th.detach(); } private: AsyncDownloadManager(){ for (int i=0; i downloadQueue; std::condition_variable dlQueueCondition; std::mutex dlQueueMutex; }; } #endif