HolyLib Wiki

luathreads

luathreads

This library lets you create extra, independent Lua interfaces (LuaInterface objects) that can run their own code on a separate thread instead of sharing the main gamemode's Lua state.
This is useful to run heavy Lua code without blocking the main server thread. Supports: Linux32

Methods

Creates a new, independent Lua interface.
It won't run on its own thread until LuaInterface:EnableThinking is called, or LuaInterface:RunTasks is used to run its queued tasks on HolyLib's thread pool instead.
LuaInterface luathreads.FindInterface( string name )
Finds a LuaInterface by its name. (See LuaInterface:SetName)
table luathreads.GetInterfaces( )
Returns every currently existing LuaInterface.