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

Method SetContext

state.go:2261–2264  ·  view source on GitHub ↗

SetContext set a context ctx to this LState. The provided ctx must be non-nil.

(ctx context.Context)

Source from the content-addressed store, hash-verified

2259
2260// SetContext set a context ctx to this LState. The provided ctx must be non-nil.
2261func (ls *LState) SetContext(ctx context.Context) {
2262 ls.mainLoop = mainLoopWithContext
2263 ls.ctx = ctx
2264}
2265
2266// Context returns the LState's context. To change the context, use WithContext.
2267func (ls *LState) Context() context.Context {

Callers 6

TestContextTimeoutFunction · 0.45
TestContextCancelFunction · 0.45
TestContextWithCroutineFunction · 0.45
TestCancelChannelReceiveFunction · 0.45

Calls

no outgoing calls

Tested by 6

TestContextTimeoutFunction · 0.36
TestContextCancelFunction · 0.36
TestContextWithCroutineFunction · 0.36
TestCancelChannelReceiveFunction · 0.36