-
Notifications
You must be signed in to change notification settings - Fork 7
Async Await Support
NStateMangager includes StateMachine and StateMachineAsync. If the majority of your actions and conditions are async, just use StateManagerAsync. Usage is virtually the same the same as StateMachine. The actions and conditions just use the Async suffix and require an async method. If you're comfortable using async and await, you shouldn't have any trouble following any of the example code.
TODO
TODO
Be aware that NStateManager doesn't protect your code from simultaneous calls to FireTrigger. In other words, calling FireTrigger starts evaluating the trigger actions and transition conditions immediately -- they don't wait for previous calls to FireTrigger to complete first.
If multiple calls to FireTrigger is a concern for your projects, please share your thoughts here.