#pragma once #include #include namespace LibThread { class Thread final : public CObject { C_OBJECT(Thread); public: explicit Thread(Function action); virtual ~Thread(); void start(); void quit(int code = 0); private: Function m_action; int m_tid { -1 }; }; }