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

Method _get_task_id

pywebio/session/threadbased.py:44–47  ·  view source on GitHub ↗
(thread: threading.Thread)

Source from the content-addressed store, hash-verified

42
43 @staticmethod
44 def _get_task_id(thread: threading.Thread):
45 tname = getattr(thread, '_target', 'task')
46 tname = getattr(tname, '__name__', tname)
47 return '%s-%s' % (tname, id(thread))
48
49 def __init__(self, target, session_info, on_task_command=None, on_session_close=None, loop=None):
50 """

Callers 3

register_threadMethod · 0.95
get_current_task_idMethod · 0.80

Calls 1

idFunction · 0.85

Tested by

no test coverage detected