MCPcopy Index your code
hub / github.com/Shopify/go-lua / ToThread

Method ToThread

lua.go:854–859  ·  view source on GitHub ↗

ToThread converts the value at index to a Lua thread (a State). This value must be a thread, otherwise the return value will be nil. http://www.lua.org/manual/5.2/manual.html#lua_tothread

(index int)

Source from the content-addressed store, hash-verified

852//
853// http://www.lua.org/manual/5.2/manual.html#lua_tothread
854func (l *State) ToThread(index int) *State {
855 if t, ok := l.indexToValue(index).(*State); ok {
856 return t
857 }
858 return nil
859}
860
861// ToValue convertes the value at index into a generic Go interface{}. The
862// value can be a userdata, a table, a thread, a function, or Go string, bool

Callers 1

threadArgFunction · 0.80

Calls 1

indexToValueMethod · 0.95

Tested by

no test coverage detected