pool

package
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package pool provides functions for managing a pool of Lua state structs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LStatePool

type LStatePool struct {
	// contains filtered or unexported fields
}

LStatePool is a pool of Lua states, with a mutex

func New

func New() *LStatePool

New returns a new Lua pool structure

func (*LStatePool) Get

func (pl *LStatePool) Get() *lua.LState

Get borrows an existing Lua state, but sets a new context

func (*LStatePool) New

func (pl *LStatePool) New() *lua.LState

New returns a new Lua state, and sets the context

func (*LStatePool) Put

func (pl *LStatePool) Put(L *lua.LState)

Put delivers back a borrowed Lua state

func (*LStatePool) Shutdown

func (pl *LStatePool) Shutdown()

Shutdown can be used then the Lua pool is being shut down

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL