qmuntal / stateless

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

Fix concurrency problem in internalFireQueued #13

Closed rickardgranberg closed 4 years ago

rickardgranberg commented 4 years ago

Fixes #12

qmuntal commented 4 years ago

Thanks for investigating the issue, your fix is spot on. Just for completeness, could you try to add a unit test that reproduce this scenario?

rickardgranberg commented 4 years ago

OK, I'm a little confused :) Do you want me to add a unit test in addition to the one you added, or?

qmuntal commented 4 years ago

OK, I'm a little confused :) Do you want me to add a unit test in addition to the one you added, or?

If the ones I added already cover your case then there is no need for you to add new one, just confirm it an I´ll push the PR.

rickardgranberg commented 4 years ago

OK, I'm a little confused :) Do you want me to add a unit test in addition to the one you added, or?

If the ones I added already cover your case then there is no need for you to add new one, just confirm it an I´ll push the PR.

Test looks fine, thank you for adding it!