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

Function register_thread

pywebio/session/__init__.py:448–457  ·  view source on GitHub ↗

Register the thread so that PyWebIO interactive functions are available in the thread. Can only be used in the thread-based session. See :ref:`Concurrent in Server mode ` :param threading.Thread thread: Thread object

(thread: threading.Thread)

Source from the content-addressed store, hash-verified

446
447@check_session_impl(ThreadBasedSession)
448def register_thread(thread: threading.Thread):
449 """Register the thread so that PyWebIO interactive functions are available in the thread.
450
451 Can only be used in the thread-based session.
452
453 See :ref:`Concurrent in Server mode <thread_in_server_mode>`
454
455 :param threading.Thread thread: Thread object
456 """
457 return get_current_session().register_thread(thread)
458
459
460def defer_call(func):

Callers 2

background_outputFunction · 0.85
background_inputFunction · 0.85

Calls 2

get_current_sessionFunction · 0.85
register_threadMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…