Init public repo

This commit is contained in:
2026-08-13 14:35:01 +07:00
commit 83161921a1
14 changed files with 399 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
#pragma once
#include "ISaveThread.h"
#include "../SaverLib.h"
#include <thread>
#include <atomic>
#include <mutex>
#include <list>
#include <memory>
class SaveThread : public ISaveThread
{
struct Msg
{
std::string msg;
ISaver::ImportanceMessage importance;
};
SaverLib& saver_;
std::list<Msg> queue_;
std::mutex m_queue_;
/*
* Поток сохранения логов
*/
std::unique_ptr<std::thread> save_thread_;
void SaveThreadMethod();
std::atomic_bool is_runing_;
public:
SaveThread(SaverLib& saver);
~SaveThread();
void save(const std::string& msg, ISaver::ImportanceMessage importance) override;
};