DeLorean
A simple single thread reactor pattern implementation. Intended to be used as a singleton and static with single state
Architecture
Cycle
The cycle of App methods is:
init:__hydrate(&mut self, _addr: A<Self>)on message:- enqueue message
- is ready? ->
update update- pop message? ->
__dispatch(&mut self, _msg: Self::Message, _addr: A<Self>) - is queue empty? ->
__render(&mut self, _addr: A<Self>) - is queue not empty? ->
update
Unsafe code and controversies
Why no RC?
Because it is thinking to be implemented as singleton and static.
Whe no RefCell?
Because all uniques (mutable) references are made in atomic instructions,
run! is designed for assure unique owner of all App is Runtime<A>