1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-21 22:49:44 +02:00

Order Send/Sync before Arc/Mutex (#605)

The Arc/Mutex chapters mention Send/Sync in the speaker notes, and in
fact serve as good illustrations of the traits, so let's define the
traits before referencing them.
This commit is contained in:
Dustin J. Mitchell 2023-05-05 03:50:17 -04:00 committed by GitHub
parent 9cff14ca31
commit d0bf0d7a44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View File

@ -261,14 +261,14 @@
- [Channels](concurrency/channels.md)
- [Unbounded Channels](concurrency/channels/unbounded.md)
- [Bounded Channels](concurrency/channels/bounded.md)
- [Shared State](concurrency/shared_state.md)
- [Arc](concurrency/shared_state/arc.md)
- [Mutex](concurrency/shared_state/mutex.md)
- [Example](concurrency/shared_state/example.md)
- [Send and Sync](concurrency/send-sync.md)
- [Send](concurrency/send-sync/send.md)
- [Sync](concurrency/send-sync/sync.md)
- [Examples](concurrency/send-sync/examples.md)
- [Shared State](concurrency/shared_state.md)
- [Arc](concurrency/shared_state/arc.md)
- [Mutex](concurrency/shared_state/mutex.md)
- [Example](concurrency/shared_state/example.md)
- [Exercises](exercises/concurrency/morning.md)
- [Dining Philosophers](exercises/concurrency/dining-philosophers.md)
- [Multi-threaded Link Checker](exercises/concurrency/link-checker.md)

View File

@ -7,3 +7,10 @@ in that thread. So the question is when you can allocate a value in one thread
and deallocate it in another.
[1]: https://doc.rust-lang.org/std/marker/trait.Send.html
<details>
As an example, a connection to the SQLite library must only be accessed from a
single thread.
</details>