| 42 | using namespace std::chrono_literals; |
| 43 | |
| 44 | LogSources::LogSources(IExecutor& executor, bool startListening) : |
| 45 | m_end(false), |
| 46 | m_autoNewLine(true), |
| 47 | m_updateEvent(CreateEvent(nullptr, false, false, nullptr)), |
| 48 | m_linebuffer(64 * 1024), |
| 49 | m_loopback(std::make_unique<Loopback>(m_timer, m_linebuffer)), |
| 50 | m_executor(executor), |
| 51 | m_throttledUpdate(m_executor, 25, [&] { m_update(); }), |
| 52 | m_listenThread(startListening ? std::make_unique<fusion::thread>([this] { Listen(); }) : nullptr) |
| 53 | { |
| 54 | m_processMonitor.ConnectProcessEnded([this](DWORD pid, HANDLE handle) { OnProcessEnded(pid, handle); }); |
| 55 | } |
| 56 | |
| 57 | LogSources::~LogSources() |
| 58 | { |
nothing calls this directly
no test coverage detected