You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I know, after I triggered an asynchronous event, the only thing I can do is calling FSM.Transaction() to finish its transaction.
sm:=fsm.NewFSM(
"start",
fsm.Events{
{Name: "start", Src: []string{"start"}, Dst: "end"},
},
fsm.Callbacks{
"leave_start": func(e*fsm.Event) {
e.Async()
},
},
)
_=sm.Event("start") // Return immediately// Do my own business// It's impossible to cancel the event at this time_=sm.Transaction() // Only can finish transaction
Currently there is no way to interrupt an asynchronous transaction on demand, right?
So I suppose maybe Transaction() method can accept a parameter to cancel the execution.
The text was updated successfully, but these errors were encountered:
As far as I know, after I triggered an asynchronous event, the only thing I can do is calling
FSM.Transaction()
to finish its transaction.Currently there is no way to interrupt an asynchronous transaction on demand, right?
So I suppose maybe
Transaction()
method can accept a parameter to cancel the execution.The text was updated successfully, but these errors were encountered: