11 msg_thread(const char* name);
12 virtual ~msg_thread();
17 virtual void run() = 0;
24 std::string thread_name;
27 static int start_wrapper(int, char* []);
30 template <typename Func>
31 class msg_thread_wrapper: public msg_thread {
33 msg_thread_wrapper(const char* name, Func run)
37 void run() { real_run(); }
42 template <typename Func>
43 msg_thread* new_msg_thread(const char* name, Func run)
45 return new msg_thread_wrapper<Func>(name, run);
48 #endif // !MSG_THREAD_H