aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJames Munns <[email protected]>2024-07-08 21:29:25 +0000
committerGitHub <[email protected]>2024-07-08 21:29:25 +0000
commit6636a5835b27f82abea9000c9f3e93b4455b29c8 (patch)
treef25a6561a7987a308ab2aa1331bf86befade4661 /docs
parentd8bd5907ca9dc1f239ca0e603b51ec723e1fef1b (diff)
parent2f62376a15b931dcf24708717695107f2c99fb1b (diff)
Merge pull request #3160 from 1-rafael-1/add-rp-sample-distribute-resources
add assign_resources rp example
Diffstat (limited to 'docs')
-rw-r--r--docs/pages/faq.adoc4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/pages/faq.adoc b/docs/pages/faq.adoc
index fc1316062..4ab04e2a1 100644
--- a/docs/pages/faq.adoc
+++ b/docs/pages/faq.adoc
@@ -358,3 +358,7 @@ An example showcasing some methods for sharing things between tasks link:https:/
358But when it comes to "waking" tasks, for example when a data transfer is complete or a button is pressed, it's faster to wake a dedicated task, because that task does not need to check which future is actually ready. `join` and `select` must check ALL of the futures they are managing to see which one (or which ones) are ready to do more work. This is because all Rust executors (like Embassy or Tokio) only have the ability to wake tasks, not specific futures. This means you will use slightly less CPU time juggling futures when using dedicated tasks. 358But when it comes to "waking" tasks, for example when a data transfer is complete or a button is pressed, it's faster to wake a dedicated task, because that task does not need to check which future is actually ready. `join` and `select` must check ALL of the futures they are managing to see which one (or which ones) are ready to do more work. This is because all Rust executors (like Embassy or Tokio) only have the ability to wake tasks, not specific futures. This means you will use slightly less CPU time juggling futures when using dedicated tasks.
359 359
360Practically, there's not a LOT of difference either way - so go with what makes it easier for you and your code first, but there will be some details that are slightly different in each case. 360Practically, there's not a LOT of difference either way - so go with what makes it easier for you and your code first, but there will be some details that are slightly different in each case.
361
362== splitting peripherals resources between tasks
363
364There are two ways to split resources between tasks, either manually assigned or by a convenient macro. See link:https://github.com/embassy-rs/embassy/blob/main/examples/rp/src/bin/assign_resources.rs[this example] \ No newline at end of file