- clang format + naming improved

This commit is contained in:
2026-09-03 10:03:42 +03:00
parent 249e614def
commit e166bae1ea
204 changed files with 20621 additions and 21019 deletions
+10 -10
View File
@@ -21,26 +21,26 @@ public:
thread_pool(size_t num_of_threads, const std::string& thread_name);
~thread_pool();
void enqueue(const task& task);
void wait(std::chrono::milliseconds interval = std::chrono::milliseconds(50));
void enqueue(const task& task);
void wait(std::chrono::milliseconds interval = std::chrono::milliseconds(50));
size_t size();
size_t threads();
private:
// need to keep track of threads so we can join them
std::vector< std::thread > workers;
std::vector<std::thread> workers;
// the task queue
std::queue< task > tasks;
std::queue<task> tasks;
// synchronization
std::mutex queue_mutex;
std::condition_variable condition;
std::atomic_bool stop = false;
std::mutex queue_mutex;
std::condition_variable condition;
std::atomic_bool stop = false;
// thread name prefix for worker threads
std::string name;
std::string name;
void run_worker();
void run_worker();
};
#endif