From a4a3a908c9b59e96259a588cfc04a5dcb3043fa0 Mon Sep 17 00:00:00 2001 From: Fernando Macedo Date: Sat, 30 Nov 2024 15:46:07 -0300 Subject: [PATCH] docs: Improving docs for async. Closes #502 --- docs/async.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/async.md b/docs/async.md index e8a7e74f..0e4ad08a 100644 --- a/docs/async.md +++ b/docs/async.md @@ -47,6 +47,23 @@ Engines are internal and are activated automatically by inspecting the registere ``` +Outer scope +: The context in which the state machine **instance** is created. + +Async callbacks? +: Indicates whether the state machine has declared asynchronous callbacks or conditions. + +Engine +: The engine that will be utilized. + +Creates internal loop +: Specifies whether the state machine initiates a new event loop if no [asyncio loop is running](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.get_running_loop). + +Reuses external loop +: Indicates whether the state machine reuses an existing [asyncio loop](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.get_running_loop) if one is already running. + + + ```{note} All handlers will run on the same thread they are called. Therefore, mixing synchronous and asynchronous code is not recommended unless you are confident in your implementation. ```