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

Function run_async

pywebio/session/__init__.py:410–421  ·  view source on GitHub ↗

Run the coroutine object asynchronously. PyWebIO interactive functions are also available in the coroutine. ``run_async()`` can only be used in :ref:`coroutine-based session `. :param coro_obj: Coroutine object :return: `TaskHandle <pywebio.session.coroutinebas

(coro_obj)

Source from the content-addressed store, hash-verified

408
409@check_session_impl(CoroutineBasedSession)
410def run_async(coro_obj):
411 """Run the coroutine object asynchronously. PyWebIO interactive functions are also available in the coroutine.
412
413 ``run_async()`` can only be used in :ref:`coroutine-based session <coroutine_based_session>`.
414
415 :param coro_obj: Coroutine object
416 :return: `TaskHandle <pywebio.session.coroutinebased.TaskHandle>` instance,
417 which can be used to query the running status of the coroutine or close the coroutine.
418
419 See also: :ref:`Concurrency in coroutine-based sessions <coroutine_based_concurrency>`
420 """
421 return get_current_session().run_async(coro_obj)
422
423
424@check_session_impl(CoroutineBasedSession)

Callers 6

mainFunction · 0.90
corobasedFunction · 0.85
coro_background_outputFunction · 0.85
coro_background_inputFunction · 0.85
mainFunction · 0.85

Calls 2

get_current_sessionFunction · 0.85
run_asyncMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…