More granular action sequencing #512
-
|
Thank you for your help with my last question. I've reproduced the order of actions from RTD for our convenience: Is there a way to sequence the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @emptierset , how are you? Eventually, one day, all actions in the same "group" could run in parallel. Currently, they run in sequence in the sync engine and concurrently on the asynchronous engine (using Assuming that you are using the sync engine (no async callbacks), there's a second level of priority that you can use, but it's still an implementation detail that can change in the future: It's the Callback priority order by how they are registered. All the priorities are in the example: https://python-statemachine.readthedocs.io/en/latest/auto_examples/all_actions_machine.html#testing The priorities: python-statemachine/statemachine/callbacks.py Lines 26 to 31 in 4449a9c This means that the callbacks of the same group are ordered when inserted on the list, and for the sync engine they are executed sequentially, so callbacks of generic name convention like The short answer is that there's not yet a Public contract in an order, but if you can rely on an implementation detail, they are ordered. Best! |
Beta Was this translation helpful? Give feedback.
Hi @emptierset , how are you?
Eventually, one day, all actions in the same "group" could run in parallel. Currently, they run in sequence in the sync engine and concurrently on the asynchronous engine (using
asyncio.gather).Assuming that you are using the sync engine (no async callbacks), there's a second level of priority that you can use, but it's still an implementation detail that can change in the future: It's the Callback priority order by how they are registered. All the priorities are in the example: https://python-statemachine.readthedocs.io/en/latest/auto_examples/all_actions_machine.html#testing
The priorities:
python-statemachine/statemachine/callbacks.py
Lines 26 to 31 in