8#ifndef HPP_AWORX_ALIB_THREADS_MODEL_THREADMANAGER
9#define HPP_AWORX_ALIB_THREADS_MODEL_THREADMANAGER
14#if !defined(HPP_ALIB_THREADS_SLEEPER)
18#if !defined (HPP_ALIB_THREADS_THREADLOCK)
22#if !defined (HPP_AWORX_ALIB_THREADS_MODEL_TRIGGERED)
26#if !defined (HPP_AWORX_ALIB_THREADS_MODEL_MTHREAD)
39#if !defined (HPP_ALIB_BOXING_ENUM)
48namespace alib {
namespace threads::model {
64 Triggered * triggered;
69 std::map<std::thread::id, MThread* >
threadMap;
71 std::list<TriggerEntry> triggerList;
89 virtual ~ThreadManager()
override;
92 virtual void Run()
override;
95 bool IsStopped() {
return mStoppedFlag; }
102 void Add( MThread& thread );
109 bool Remove( MThread& thread );
116 void AddTriggered( Triggered& triggered);
123 void RemoveTriggered( Triggered& triggered);
126 void StopAndTerminateAll();
136 virtual void Terminate()
override { Thread::Terminate(); }
143using MThread = alib::threads::model::MThread;
146using ThreadManager = alib::threads::model::ThreadManager;
@ Add
Arithmetic addition ('+'). Precedence 800.
@ Remove
Denotes removals.
ALIB_API HashMap< std::thread::id, Thread * > threadMap