qmuntal / stateless

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

Fix race conditions in queued Fire #68

Closed qmuntal closed 10 months ago

qmuntal commented 10 months ago

This PR reimplements how triggers are fired in queued mode to make it more robust to race conditions.

It contains learnings from #66, which supersedes.

liang-kang commented 10 months ago

This PR may break the rule of run-to-complete.

Try to fix it with https://github.com/qmuntal/stateless/pull/69