diff options
author | chai <chaifix@163.com> | 2019-03-27 22:18:14 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-03-27 22:18:14 +0800 |
commit | 69f7d1bd745ed5680b9bc4e3cfdd882ff2a5ad26 (patch) | |
tree | 729e563da8fea6cf8c5455f3afdb3c6ce0aecde4 /source/libs/asura-lib-core/threading/thread.h | |
parent | 66c5fdc564dd892ed265132d6c1378dbe3cebcee (diff) |
+threading
Diffstat (limited to 'source/libs/asura-lib-core/threading/thread.h')
-rw-r--r-- | source/libs/asura-lib-core/threading/thread.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/source/libs/asura-lib-core/threading/thread.h b/source/libs/asura-lib-core/threading/thread.h new file mode 100644 index 0000000..f4d3b48 --- /dev/null +++ b/source/libs/asura-lib-core/threading/thread.h @@ -0,0 +1,53 @@ +#ifndef __ASURA_THREAD_H__ +#define __ASURA_THREAD_H__ + +#include <queue> +#include <asura-lib-utils/scripting/portable.hpp> + +#include "thread_task.h" + +namespace AsuraEngine +{ + namespace Threading + { + + /// + /// ̵߳ľʵ֣ûģһֲԣ + /// 1: win32 + /// 2: posix + /// 3: SDL + /// 4: std::thread + /// + ASURA_ABSTRACT class ThreadImpl + { + public: + + }; + + /// + /// ߳壬ÿ߳άһtask queue + /// + class Thread ASURA_FINAL + : public AEScripting::Portable<Thread> + { + public: + + LUAX_DECL_FACTORY(Thread); + + bool Enqueue(ThreadTask* task); + + private: + + /// + /// С + /// + std::queue<ThreadTask*> mTaskQueue; + + ThreadImpl* mImpl; + + }; + + } +} + +#endif
\ No newline at end of file |