3 ms·
There is an executor project: https://github.com/embassy-rs/embassy https://github.com/embassy-rs/embassy I'm very excited about this for one simple stupid rea
by floatboth 5y ago
There is an executor project: https://github.com/embassy-rs/embassy https://github.com/embassy-rs/embassy
I'm very excited about this for one simple stupid reason: sleep(). Awaiting a timer delay deep inside some code is gonna be amazing. With typical sync code, you basically have to split your code and queue up the next work somewhere that would be picked up by the timer interrupt… basically doing the whole state-keeping that async would do for you.
- the__alchemist 5y agoThat sound like a nice advantage. I'd like to give this a shot on a future project. Its creator and I share some API design ideas, like using less typestate programming than other conventions, but I haven't used Embassy due to being cautious of Async. (The Typestate thing is a tangent; short explanation is it lets you check for misconfigured pins etc at compile time, but makes syntax significantly more verbose and harder to refactor)