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)
| 408 | |
| 409 | @check_session_impl(CoroutineBasedSession) |
| 410 | def 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) |
no test coverage detected
searching dependent graphs…