29#include "ThreadManager.h"
30#include <sptk5/threads/Runable.h>
31#include <sptk5/threads/SynchronizedQueue.h>
32#include <sptk5/threads/Thread.h>
33#include <sptk5/threads/ThreadEvent.h>
72 std::chrono::milliseconds maxIdleTime = std::chrono::seconds(3600));
83 void execute(const SRunable& task);
85 void terminate() override;
91 void threadFunction() override;
97 mutable std::mutex m_mutex;
112 std::chrono::milliseconds m_maxIdleSeconds;
114 SRunable m_currentRunable;
116 void setRunable(
const SRunable& runable);
Thread event interface.
Definition: ThreadEvent.h:43
Definition: WorkerThread.h:55
WorkerThread(const SThreadManager &threadManager, SynchronizedQueue< SRunable > &queue, ThreadEvent *threadEvent=nullptr, std::chrono::milliseconds maxIdleTime=std::chrono::seconds(3600))
~WorkerThread() noexcept override=default