summaryrefslogtreecommitdiff
path: root/source/libs/asura-lib-utils/threading
diff options
context:
space:
mode:
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;
///
/// С