29#include <sptk5/threads/SynchronizedQueue.h>
30#include <sptk5/threads/Thread.h>
45 void registerThread(
Thread* thread);
47 void destroyThread(
Thread* thread);
49 size_t threadCount()
const;
58 explicit Joiner(
const String& name);
60 void push(
const SThread& thread);
65 void threadFunction()
override;
67 void joinTerminatedThreads(std::chrono::milliseconds timeout);
73 mutable std::mutex m_mutex;
74 std::map<Thread*, SThread> m_runningThreads;
75 std::shared_ptr<Joiner> m_joiner;
77 void terminateRunningThreads();
80using SThreadManager = std::shared_ptr<ThreadManager>;
Definition: ThreadManager.h:35
std::shared_ptr< Thread > SThread
Definition: Thread.h:153