diff options
Diffstat (limited to 'source/libs/asura-lib-utils/threading/thread_task.h')
-rw-r--r-- | source/libs/asura-lib-utils/threading/thread_task.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/source/libs/asura-lib-utils/threading/thread_task.h b/source/libs/asura-lib-utils/threading/thread_task.h new file mode 100644 index 0000000..1ea0a1a --- /dev/null +++ b/source/libs/asura-lib-utils/threading/thread_task.h @@ -0,0 +1,44 @@ +#ifndef __ASURA_THRAD_TASK_H__ +#define __ASURA_THRAD_TASK_H__ + +#include <asura-lib-utils/type.h> +#include <asura-lib-utils/scripting/portable.hpp> + +namespace AsuraEngine +{ + namespace Threading + { + + /// + /// ϣһ̴̳߳TaskдExecute + /// + ASURA_ABSTRACT class ThreadTask + : virtual public AEScripting::NativeAccessor + { + public: + + ThreadTask(); + virtual ~ThreadTask(); + + /// + /// ִɺtrueûص + /// + virtual bool Execute() = 0; + + /// + /// ûص + /// + virtual void Invoke() = 0; + + protected: + + Luax::LuaxMemberRef mCallback; + + }; + + } +} + +namespace AEThreading = AsuraEngine::Threading; + +#endif
\ No newline at end of file |