diff options
Diffstat (limited to 'source/game/scripting/StarLuaComponents.hpp')
-rw-r--r-- | source/game/scripting/StarLuaComponents.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/game/scripting/StarLuaComponents.hpp b/source/game/scripting/StarLuaComponents.hpp index e3d1d20..b6c19ac 100644 --- a/source/game/scripting/StarLuaComponents.hpp +++ b/source/game/scripting/StarLuaComponents.hpp @@ -10,6 +10,8 @@ namespace Star { STAR_EXCEPTION(LuaComponentException, LuaException); +STAR_CLASS(ScriptableThread); + // Basic lua component that can be initialized (takes and then owns a script // context, calls the script context's init function) and uninitialized // (releases the context, calls the context 'uninit' function). @@ -94,12 +96,17 @@ protected: bool checkInitialization(); private: + LuaCallbacks makeThreadsCallbacks(); + StringList m_scripts; StringMap<LuaCallbacks> m_callbacks; LuaRootPtr m_luaRoot; TrackerListenerPtr m_reloadTracker; Maybe<LuaContext> m_context; Maybe<String> m_error; + + StringMap<shared_ptr<ScriptableThread>> m_threads; + mutable RecursiveMutex m_threadLock; }; // Wraps a basic lua component to add a persistent storage table translated |