This looks pretty interesting. Besides telephony and other message-passing applications, what are the hero use cases for an actor system on an embedded device?
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.
Getting a &'static mut T means that you're allowed to keep the reference around forever, beyond the scope of the call. To be sound that means that the calling function is never allowed to use the reference again, not even to drop it.
The only sound way to even get a &'static mut T would be to leak a heap allocation (which this library explicitly forbids itself from).
3 comments
[ 4.8 ms ] story [ 20.0 ms ] threadGetting a &'static mut T means that you're allowed to keep the reference around forever, beyond the scope of the call. To be sound that means that the calling function is never allowed to use the reference again, not even to drop it.
The only sound way to even get a &'static mut T would be to leak a heap allocation (which this library explicitly forbids itself from).