Beh01der / EasyFlow

EasyFlow - Simple and lightweight Finite State Machine for Java
http://datasymphony.com.au/open-source/easyflow
Apache License 2.0
445 stars 86 forks source link

Adding terminate() method? #20

Closed antoine-dbr closed 9 years ago

antoine-dbr commented 9 years ago

Hi Andrey,

Thank you for your library, along with greenrobot EventBus, it helped us scale our background processing engine in our Android app!

It may be a non-issue but in certain of our state handler sub-classes, we initialize resources (ex: register broadcast receivers, holding a wakelock, etc.). However, for transitions that are not initiated within a state, it would be nice to have a mirror handler method for call(), named terminate() where we can resource clean-up.

Please let me know what you think, maybe I am misusing the APIs and there is already a facility in place for this scenario.

Thanks! -Antoine

antoine-dbr commented 9 years ago

I was able to deal with his without a lib change, closing.