aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Daniel Carosone <Daniel.Carosone@gmail.com> 2020-10-02 19:56:17 +1000
committerGravatar Daniel Carosone <Daniel.Carosone@gmail.com> 2020-10-02 19:56:17 +1000
commit91c2d4850e31da1bbd49fc668ae79533e7ac3ab4 (patch)
tree1b2a9d3fb6f660813b667a64352558442edb3a26
parentbaa2edfe72ec2e33a84dfebc6c4baf2c2b8d55c2 (diff)
downloadrtic-91c2d4850e31da1bbd49fc668ae79533e7ac3ab4.tar.gz
rtic-91c2d4850e31da1bbd49fc668ae79533e7ac3ab4.tar.zst
rtic-91c2d4850e31da1bbd49fc668ae79533e7ac3ab4.zip
Shared access is useful with interior mutability
-rw-r--r--book/en/src/by-example/resources.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/book/en/src/by-example/resources.md b/book/en/src/by-example/resources.md
index d67a72ff..9831e55b 100644
--- a/book/en/src/by-example/resources.md
+++ b/book/en/src/by-example/resources.md
@@ -114,7 +114,9 @@ are required to access the resource even if the resource is contended by several
tasks running at different priorities. The downside is that the task only gets a
shared reference (`&-`) to the resource, limiting the operations it can perform
on it, but where a shared reference is enough this approach reduces the number
-of required locks.
+of required locks. In addition to simple immutable data, this shared access can
+be useful where the resource type safely implements interior mutability, with
+appropriate locking or atomic operations of its own.
Note that in this release of RTIC it is not possible to request both exclusive
access (`&mut-`) and shared access (`&-`) to the *same* resource from different