X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/63b7a79069a399c32d575bb71832fcad134117c9..ab942598491747509a9586bf3c0c1c65785b9dd3:/src/part15.rs?ds=sidebyside diff --git a/src/part15.rs b/src/part15.rs index 47952d6..79fd9b4 100644 --- a/src/part15.rs +++ b/src/part15.rs @@ -120,7 +120,7 @@ pub fn main() { //@ In part 13, we talked about types that are marked `Send` and thus can be moved to another thread. However, we did *not* //@ talk about the question whether a reference is `Send`. For `&mut T`, the answer is: It is `Send` whenever `T` is send. //@ `&mut` allows moving values back and forth, it is even possible to [`swap`](https://doc.rust-lang.org/stable/std/mem/fn.swap.html) -//@ the contents of two mutable references. So in terms of concurrency, sending a mutable, exclusive reference is very much like +//@ the contents of two mutable references. So in terms of concurrency, sending a mutable, unique reference is very much like //@ sending full ownership, in the sense that it can be used to move the object to another thread. //@ //@ But what about `&T`, a shared reference? Without interior mutability, it would always be all-right to send such values.