qmuntal / stateless

Go library for creating finite state machines
BSD 2-Clause "Simplified" License
942 stars 49 forks source link

Document what context.Context passed to actions does #28

Closed soypat closed 3 years ago

soypat commented 3 years ago

I'm using stateless and there is nothing on the context passed to the action.

Does it cancel? When does it cancel? Do errors cancel it?

qmuntal commented 3 years ago

The Fire context parameter is passed down to all user defined callbacks and there isn't any place where the context error is check. This means that as of today is the user responsibility to implement context error handling.

I'll add some docs for this topic in the next release, and feel free to submit a proposal if you think stateless could improve on this area.