doc: mention diverging tasks in book

This commit is contained in:
Oleksandr Babak 2025-03-23 11:24:45 +01:00 committed by Emil Fresk
parent 160b7c00a6
commit f6eacdc8d1

View file

@ -1,6 +1,6 @@
# 'static super-powers
In `#[init]` and `#[idle]` `local` resources have `'static` lifetime.
In `#[init]`, `#[idle]` and divergent software tasks `local` resources have `'static` lifetime.
Useful when pre-allocating and/or splitting resources between tasks, drivers or some other object. This comes in handy when drivers, such as USB drivers, need to allocate memory and when using splittable data structures such as [`heapless::spsc::Queue`].