summaryrefslogtreecommitdiff
path: root/source/libs/asura-lib-utils/threading
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-03-29 09:01:36 +0800
committerchai <chaifix@163.com>2019-03-29 09:01:36 +0800
commite37b1dfd022bda4dfdcba243c0543c62c89db32f (patch)
treeeb31ae960809498462c9232c9dc1df392b987fa7 /source/libs/asura-lib-utils/threading
parent62085e1b49ce2d8a630373e410812d5c4a9eecc2 (diff)
*misc
Diffstat (limited to 'source/libs/asura-lib-utils/threading')
-rw-r--r--source/libs/asura-lib-utils/threading/thread.cpp4
-rw-r--r--source/libs/asura-lib-utils/threading/thread.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/source/libs/asura-lib-utils/threading/thread.cpp b/source/libs/asura-lib-utils/threading/thread.cpp
index 9c71ace..628eee4 100644
--- a/source/libs/asura-lib-utils/threading/thread.cpp
+++ b/source/libs/asura-lib-utils/threading/thread.cpp
@@ -10,7 +10,7 @@ namespace AsuraEngine
namespace Threading
{
- Thread::Thread(Luax::LuaxState& father, const std::string& name)
+ Thread::Thread(ThreadType type, Luax::LuaxState& luaThread, const std::string& name/* = ""*/)
: mName(name)
{
}
@@ -78,7 +78,7 @@ namespace AsuraEngine
void Thread::Process()
{
- LUAX_STATE(AEScripting::LuaEnv::Get()->GetMainState());
+ LUAX_STATE(AEScripting::LuaEnv::Get()->GetMainThread());
while (!mTaskQueue.empty())
{
Task* task = mTaskQueue.front();
diff --git a/source/libs/asura-lib-utils/threading/thread.h b/source/libs/asura-lib-utils/threading/thread.h
index 3fa079a..3928963 100644
--- a/source/libs/asura-lib-utils/threading/thread.h
+++ b/source/libs/asura-lib-utils/threading/thread.h
@@ -100,11 +100,13 @@ namespace AsuraEngine
LUAX_DECL_METHOD(_GetName);
LUAX_DECL_METHOD(_Sleep);
LUAX_DECL_METHOD(_Post);
+ LUAX_DECL_METHOD(_GetType);
//----------------------------------------------------------------------------//
ThreadImpl* mImpl;
std::string mName;
+ ThreadType mType;
///
/// С