Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ExecuteLuaWithGlobalsPool ¶ added in v0.2.1
func ExecuteLuaWithGlobalsPool(f RegisterType, globals map[string]lua.LValue, source string) (lua.LValue, error)
ExecuteLuaWithGlobalsPool 使用池化的Lua虚拟机执行脚本
func LoadPreloadLuaFiles ¶ added in v0.2.2
LoadPreloadLuaFiles 加载并验证Lua预加载文件
Types ¶
type LuaVMPool ¶ added in v0.2.1
type LuaVMPool struct {
// contains filtered or unexported fields
}
LuaVMPool Lua虚拟机池,避免全局锁竞争
func (*LuaVMPool) GetLuaState ¶ added in v0.2.1
GetLuaState 从池中获取Lua状态机
func (*LuaVMPool) PutLuaState ¶ added in v0.2.1
PutLuaState 将Lua状态机归还到池中
Click to show internal directories.
Click to hide internal directories.