-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added method to restart the current state (#3328)
# Objective It would be useful to be able to restart a state (such as if an operation fails and needs to be retried from `on_enter`). Currently, it seems the way to restart a state is to transition to a dummy state and then transition back. ## Solution The solution is to add a `restart` method on `State<T>` that allows for transitioning to the already-active state. ## Context Based on [this](https://discord.com/channels/691052431525675048/742884593551802431/920335041756815441) question from the Discord. Closes #2385 Co-authored-by: Carter Anderson <mcanders1@gmail.com>
- Loading branch information
Showing
1 changed file
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters