From 64ff027e645208c1a64a6dbeb2d1540da9e718f8 Mon Sep 17 00:00:00 2001 From: Niels Breuker Date: Sun, 2 Oct 2022 12:54:47 +0200 Subject: First PoC for multithreading in plugins. Crashes on reload while another thread is active. No nice way to return to the default lua_State --- src/Bindings/LuaState.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Bindings/LuaState.h') diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h index d579369f0..6434bb625 100644 --- a/src/Bindings/LuaState.h +++ b/src/Bindings/LuaState.h @@ -624,12 +624,14 @@ public: void Push(const cEntity * a_Entity); void Push(cLuaServerHandle * a_ServerHandle); void Push(cLuaTCPLink * a_TCPLink); + void Push(std::thread * a_Thread); void Push(cLuaUDPEndpoint * a_UDPEndpoint); void Push(double a_Value); void Push(int a_Value); void Push(long a_Value); void Push(const UInt32 a_Value); void Push(std::chrono::milliseconds a_time); + void Push(std::mutex * a_Mutex); /** Pops the specified number of values off the top of the Lua stack. */ void Pop(int a_NumValuesToPop = 1); -- cgit v1.2.3