1 #ifndef MSP_CORE_THREAD_H_
2 #define MSP_CORE_THREAD_H_
7 Base class for threads. To create a thread for some task, derive it from this
8 class and implement the main() function. Note that threads are not
9 automatically started upon creation - you must manually call launch() instead.
10 This is to allow initializing variables of the derived class before the thread
24 Thread(const Thread &);
25 Thread &operator=(const Thread &);
29 /** Waits for the thread to exit. Calling this from the thread will cause a
33 /** Violently terminates the thread. This should only be used as a last
34 resort, as the thread gets no chance to clean up. */
38 virtual void main() = 0;