6 #include "simgrid_features.h"
12 msg_thread(const char* name);
13 virtual ~msg_thread();
18 virtual void run() = 0;
25 std::string thread_name;
28 static int start_wrapper(int, char* []);
31 template <typename Func>
32 class msg_thread_wrapper: public msg_thread {
34 msg_thread_wrapper(const char* name, Func run)
38 void run() { real_run(); }
43 template <typename Func>
44 msg_thread* new_msg_thread(const char* name, Func run)
46 return new msg_thread_wrapper<Func>(name, run);
49 #endif // !MSG_THREAD_H