From f6eacdc8d16fd0b47d28fa6a84e6099c9c09eca9 Mon Sep 17 00:00:00 2001 From: Oleksandr Babak Date: Sun, 23 Mar 2025 11:24:45 +0100 Subject: [PATCH] doc: mention diverging tasks in book --- book/en/src/by-example/tips/static_lifetimes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/en/src/by-example/tips/static_lifetimes.md b/book/en/src/by-example/tips/static_lifetimes.md index 7f4e38f0b85..6f88bf046b7 100644 --- a/book/en/src/by-example/tips/static_lifetimes.md +++ b/book/en/src/by-example/tips/static_lifetimes.md @@ -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`].