Skip to content

Commit

Permalink
feat: SCXML processing model
Browse files Browse the repository at this point in the history
  • Loading branch information
fgmacedo committed Dec 8, 2024
1 parent 95d8289 commit dbac19b
Show file tree
Hide file tree
Showing 60 changed files with 972 additions and 437 deletions.
1 change: 0 additions & 1 deletion docs/processing_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,3 @@ after 'connection_succeed' from 'connecting' to 'connected'
```{note}
Note that the events `connect` and `connection_succeed` are executed sequentially, and the `connect.after` runs on the expected order.
```

4 changes: 2 additions & 2 deletions docs/transitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Syntax:
>>> draft = State("Draft")

>>> draft.to.itself()
TransitionList([Transition(State('Draft', ...
TransitionList([Transition('Draft', 'Draft', event='', internal=False)])

```

Expand All @@ -101,7 +101,7 @@ Syntax:
>>> draft = State("Draft")

>>> draft.to.itself(internal=True)
TransitionList([Transition(State('Draft', ...
TransitionList([Transition('Draft', 'Draft', event='', internal=True)])

```

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ select = [
ignore = [
"UP006", # `use-pep585-annotation` Requires Python3.9+
"UP035", # `use-pep585-annotation` Requires Python3.9+
"UP037", # `use-pep586-annotation` Requires Python3.9+
"UP038", # `use-pep585-annotation` Requires Python3.9+
]

Expand Down
3 changes: 1 addition & 2 deletions statemachine/engines/async_.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from ..event_data import EventData
from ..event_data import TriggerData
from ..exceptions import TransitionNotAllowed
from ..i18n import _
from .base import BaseEngine

if TYPE_CHECKING:
Expand Down Expand Up @@ -46,7 +45,7 @@ async def processing_loop(self):
first_result = self._sentinel
try:
# Execute the triggers in the queue in FIFO order until the queue is empty
while self._running and not self.empty():
while self.running and not self.empty():
trigger_data = self.pop()
current_time = time()
if trigger_data.execution_time > current_time:
Expand Down
Loading

0 comments on commit dbac19b

Please sign in to comment.