We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event
Hi, I have a deadlock when trying to initiate transition in after-event callback for dst == src
Simpliest example
package main import ( "context" "fmt" "github.com/looplab/fsm" ) func main() { fsm := fsm.NewFSM( "start", fsm.Events{ {Name: "created", Src: []string{"start"}, Dst: "start"}, {Name: "checked", Src: []string{"start"}, Dst: "checked"}, }, fsm.Callbacks{ "after_created": func(ctx context.Context, e *fsm.Event) { // some checks if err := e.FSM.Event(ctx, "checked"); err != nil { fmt.Println(err) } }, }, ) if err := fsm.Event(context.Background(), "created"); err != nil { panic(fmt.Sprintf("Error encountered when triggering the run event: %v", err)) } }
It seems to be a bag that there is no eventMu.Unlock() for an event without state transition fsm.go#L335
eventMu.Unlock()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I have a deadlock when trying to initiate transition in after-event callback for dst == src
Simpliest example
It seems to be a bag that there is no
eventMu.Unlock()
for an event without state transitionfsm.go#L335
The text was updated successfully, but these errors were encountered: