1 #ifndef THREAD_CABINET_CLASS
2 #define THREAD_CABINET_CLASS
96 thread_amorph *_threads;
Provides a platform-independent object for adding threads to a program.
Manages a collection of threads.
bool cancel_thread(const structures::unique_int &to_cancel)
shuts down the thread "to_cancel" as quickly as possible.
bool any_running() const
returns true if any threads are currently running.
bool zap_thread(const structures::unique_int &to_whack)
removes the thread with the id "to_whack".
structures::unique_int add_thread(ethread *to_add, bool start_it, void *parm)
adds a thread to be managed by the thread_cabinet.
void start_all(void *pointer)
cranks up any threads that are not already running.
structures::int_set thread_ids() const
returns the identifiers of all threads managed by this object.
void cancel_all()
signals to all threads that they should exit as soon as possible.
virtual ~thread_cabinet()
void clean_debris()
clean out threads that have finished.
int threads() const
number of threads being managed here.
DEFINE_CLASS_NAME("thread_cabinet")
ethread * get_thread(int index)
this returns the thread at "index" in our list.
void stop_all()
makes all of the threads quit.
A roller that's based on integers. This is the most common type so far.
A simple object that wraps a templated set of ints.
A unique identifier based on integers.