#ifndef LOG_QUEUE_H #define LOG_QUEUE_H #include #include #include #include #include #include class log_queue { private: std::mutex _mutex; std::condition_variable _cond; std::queue> _queue; std::atomic _working; std::thread _worker; private: void worker_func(); public: log_queue(); ~log_queue(); void add_log(const std::function& logFunc); }; #endif /* LOG_QUEUE_H */