protofsm: allow multiple internal events to be emitted
In this commit, we update the execution logic to allow multiple internal events to be emitted. This is useful to handle potential out of order state transitions, as they can be cached, then emitted once the relevant pre-conditions have been met.
This commit is contained in:
3 files changed
+25
-25
No files matched your search
@@ -80,7 +80,9 @@ func (d *dummyStateStart) ProcessEvent(event dummyEvents, env *dummyEnv,
|
||||
return &StateTransition[dummyEvents, *dummyEnv]{
|
||||
NextState: &dummyStateStart{},
|
||||
NewEvents: fn.Some(EmittedEvent[dummyEvents]{
|
||||
InternalEvent: fn.Some(dummyEvents(&goToFin{})),
|
||||
InternalEvent: fn.Some(
|
||||
[]dummyEvents{&goToFin{}},
|
||||
),
|
||||
}),
|
||||
}, nil
|
||||
|
||||
|
||||
Reference in new issue
Block a user