Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fsm.Event(ctx, ...) not work properly with context.WithTimeout() #90

@qiulin

Description

@qiulin

When I use context.WithTimeout(ctx, time.Duration) with fsm.Event(ctx, ...) like:

Callbacks{
			"enter_end": func(ctx context.Context, e *Event) {
				go func() {
					<-ctx.Done()
					enterEndAsyncWorkDone = true
				}()
			},
		},

the internal block exec immediately, not after timeout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions