MCPcopy Create free account
hub / github.com/yuin/gopher-lua / threadRun

Function threadRun

vm.go:267–295  ·  view source on GitHub ↗
(L *LState)

Source from the content-addressed store, hash-verified

265}
266
267func threadRun(L *LState) {
268 if L.stack.IsEmpty() {
269 return
270 }
271
272 defer func() {
273 if rcv := recover(); rcv != nil {
274 var lv LValue
275 if v, ok := rcv.(*ApiError); ok {
276 lv = v.Object
277 } else {
278 lv = LString(fmt.Sprint(rcv))
279 }
280 if parent := L.Parent; parent != nil {
281 if L.wrapped {
282 L.Push(lv)
283 parent.Panic(L)
284 } else {
285 L.SetTop(0)
286 L.Push(lv)
287 switchToParentThread(L, 1, true, true)
288 }
289 } else {
290 panic(rcv)
291 }
292 }
293 }()
294 L.mainLoop(L, nil)
295}
296
297type instFunc func(*LState, uint32, *callFrame) int
298

Callers 3

coResumeFunction · 0.70
ResumeMethod · 0.70
ResumeMethod · 0.70

Calls 5

LStringTypeAlias · 0.85
switchToParentThreadFunction · 0.70
IsEmptyMethod · 0.65
PushMethod · 0.65
SetTopMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…