29#include <sptk5/threads/Locks.h>
54 std::shared_ptr<std::thread> m_thread;
55 bool m_terminated {
false};
57 std::shared_ptr<ThreadManager> m_threadManager;
68 using Id = std::thread::id;
76 explicit Thread(
const String& name,
const std::shared_ptr<ThreadManager>& threadManager =
nullptr);
140 virtual bool sleep_for(std::chrono::milliseconds interval);
Definition: DateTime.h:86
Generic unnamed semaphore class.
Definition: Semaphore.h:52
virtual bool sleep_for(std::chrono::milliseconds interval)
Thread(const String &name, const std::shared_ptr< ThreadManager > &threadManager=nullptr)
virtual bool terminated()
virtual void onThreadExit()
Definition: Thread.h:107
const String & name() const
Definition: Thread.h:130
virtual bool sleep_until(const DateTime ×tamp)
std::thread::id Id
Definition: Thread.h:68
virtual void threadFunction()=0
std::unique_ptr< Thread > UThread
Definition: Thread.h:158
std::shared_ptr< Thread > SThread
Definition: Thread.h:153