top | item 26033407

(no title)

drewfish | 5 years ago

I don't know about "hero" use cases, but I use actors (state machine responding to events in a queue) quite a bit when making hobby Arduino devices. It allows me to have a "button" device that can work with both the hardware pin interrupt controller and a clock to generate "click" and "hold" events, to pass to other actors in the system. I also will also use an actor to manage an I2C device, so that that actor can detect errors and restart the device to recover from errors. You could do either of those things without actors, but doing so has made it easier for me to compartmentalize my code and organize how data flows and states change.

discuss

order

No comments yet.