logoalt Hacker News

adastra22yesterday at 1:33 AM4 repliesview on HN

> It obsoletes the need for a traditional RTOS with kernel context switching

Uh, what does async have to do with hard real-time guarantees?


Replies

dirbaioyesterday at 5:07 PM

(Embassy dev here)

You can get preemptive scheduling of async tasks with InterruptExecutor. You create one executor for each priority level, then spawn the tasks in the right one. The latency of the executor and the compiler-generated async state machines is predictable, so you can use Embassy for hard real-time work. See example: https://github.com/embassy-rs/embassy/blob/main/examples/nrf...

Additionally the executor has support for scheduling tasks by priority or deadline within a single priority level. (in latest git, will be in next crates.io release)

bfrogyesterday at 3:37 AM

It doesn't have anything to do with it. It's some nice syntax over cooperative multitasking.

show 1 reply
kahlonelyesterday at 10:01 AM

99% people in this thread have no idea what you mean. And that’s the reason projects like these make it to frontpage every other day and have hundreds of upvotes/comments.

show 1 reply