MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / run

Method run

pywebio/session/threadbased.py:259–267  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

257
258 @wraps(callback)
259 def run(callback):
260 try:
261 callback(event['data'])
262 except Exception as e:
263 # 子类可能会重写 get_current_session ,所以不要用 ThreadBasedSession.get_current_session 来调用
264 if not isinstance(e, SessionException):
265 self.on_task_exception()
266
267 # todo: good to have -> clean up from `register_thread()`
268
269 if mutex:
270 run(callback)

Callers 6

prism.min.jsFile · 0.45
oFunction · 0.45
uFunction · 0.45
dtFunction · 0.45
start_serverFunction · 0.45
start_serverFunction · 0.45

Calls 2

on_task_exceptionMethod · 0.80
callbackFunction · 0.50

Tested by

no test coverage detected