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

Method Context

lua.go:323–328  ·  view source on GitHub ↗

Context is called by a continuation function to retrieve the status of the thread and context information. When called in the origin function, it will always return (0, false, nil). When called inside a continuation function, it will return (ctx, shouldYield, err), where ctx is the value that was pa

()

Source from the content-addressed store, hash-verified

321//
322// http://www.lua.org/manual/5.2/manual.html#lua_getctx
323func (l *State) Context() (int, bool, error) {
324 if l.callInfo.isCallStatus(callStatusYielded) {
325 return l.callInfo.context, l.callInfo.shouldYield, l.callInfo.error
326 }
327 return 0, false, nil
328}
329
330// CallWithContinuation is exactly like Call, but allows the called function to
331// yield.

Callers 1

Calls 1

isCallStatusMethod · 0.80

Tested by

no test coverage detected