MCPcopy Index your code
hub / github.com/yuin/gopher-lua / RemoveContext

Method RemoveContext

state.go:2272–2277  ·  view source on GitHub ↗

RemoveContext removes the context associated with this LState and returns this context.

()

Source from the content-addressed store, hash-verified

2270
2271// RemoveContext removes the context associated with this LState and returns this context.
2272func (ls *LState) RemoveContext() context.Context {
2273 oldctx := ls.ctx
2274 ls.mainLoop = mainLoop
2275 ls.ctx = nil
2276 return oldctx
2277}
2278
2279// Converts the Lua value at the given acceptable index to the chan LValue.
2280func (ls *LState) ToChannel(n int) chan LValue {

Callers 1

TestContextTimeoutFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestContextTimeoutFunction · 0.36