MCPcopy Index your code
hub / github.com/davyxu/cellnet / protectedCall

Method protectedCall

queue.go:62–75  ·  view source on GitHub ↗

保护调用用户函数

(callback func())

Source from the content-addressed store, hash-verified

60
61// 保护调用用户函数
62func (self *eventQueue) protectedCall(callback func()) {
63
64 if self.capturePanic {
65 defer func() {
66
67 if err := recover(); err != nil {
68 self.onPanic(err, self)
69 }
70
71 }()
72 }
73
74 callback()
75}
76
77// 开启事件循环
78func (self *eventQueue) StartLoop() EventQueue {

Callers 1

StartLoopMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected