diff options
author | chai <chaifix@163.com> | 2018-10-23 15:56:01 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-23 15:56:01 +0800 |
commit | 6551adeca70d4299a99d45245d4e13dbfdfa87e5 (patch) | |
tree | a766ff9a0cdc52588a6aa62e41d0b134c04c2ba0 /src/lua/modules/thread/Thread.h | |
parent | a164919e8eb3409d13bb225cc0e6f0b95446e8e0 (diff) |
*修改lua绑定文件的文件名
Diffstat (limited to 'src/lua/modules/thread/Thread.h')
-rw-r--r-- | src/lua/modules/thread/Thread.h | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/src/lua/modules/thread/Thread.h b/src/lua/modules/thread/Thread.h deleted file mode 100644 index 60d588a..0000000 --- a/src/lua/modules/thread/Thread.h +++ /dev/null @@ -1,94 +0,0 @@ -#include "libjin/jin.h" -#include "lua/common/common.h" - -namespace JinEngine -{ - namespace Lua - { - namespace thread - { - - class Thread - { - public: - typedef JinEngine::MultiThread::Thread::Variant Variant; - typedef JinEngine::MultiThread::Thread::ThreadRunner ThreadRunner; - - Thread(std::string _name, std::string _code, ThreadRunner runner) - : name(_name) - , code(_code) - { - thread = new JinEngine::MultiThread::Thread(_name, runner); - } - - ~Thread() - { - delete thread; - } - - bool start(void* p) - { - return thread->start(p); - } - - void wait() - { - thread->wait(); - } - - void send(int slot, const Variant& value) - { - thread->send(slot, value); - } - - bool receive(int slot) - { - return thread->receive(slot); - } - - Variant fetch(int slot) - { - return thread->fetch(slot); - } - - Variant demand(int slot) - { - return thread->demand(slot); - } - - void remove(int slot) - { - thread->remove(slot); - } - - const char* getName() - { - return name.c_str(); - } - - bool isRunning() - { - return thread->isRunning(); - } - - void lock() - { - thread->lock(); - } - - void unlock() - { - thread->unlock(); - } - - const std::string name; - const std::string code; - - private: - JinEngine::MultiThread::Thread* thread; - - }; - - } // thread - } // namespace Lua -} // namespace JinEngine
\ No newline at end of file |