1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-17 07:11:27 +02:00
Commit Graph

27 Commits

Author SHA1 Message Date
vanyabrucker
1ed40f4746
Corrected spelling in bounded.md (#844)
Corrected spellling  bounded.md
2023-06-21 07:12:59 +00:00
LIU JIE
cf0ce5c0b2
Explain iff in mutex.md (#810)
---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-06-13 12:56:42 +00:00
Martin Geisler
9cf55893ac
Rephrase when send blocks (#792)
* Rephrase when `send` blocks

From a discussion with @hueich in #786: https://github.com/google/comprehensive-rust/pull/786#discussion_r1224850499.
2023-06-11 13:20:33 +00:00
Bryan Hitchcock
584e3ecd7d
Fix inconsistent code in unbounded.md (#656)
Update unbounded.md to address inconsistent code

Fix inconsistency between concurrency `unbounded.md` and `bounded.md` by using implicitly named arguments for both.
2023-05-23 11:36:58 +02:00
Dustin J. Mitchell
d0bf0d7a44
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.
2023-05-05 09:50:17 +02:00
Martin Geisler
b051b04afa
Use explicit Arc::clone instead of calling .clone() method (#596)
This is to highlight that the clones are cheap: they run custom logic
in the reference counted type, they don’t do a deep clone.
2023-04-27 23:46:09 +02:00
Oliver Mannion
9ee562c267
Remove unnecessary Mutex::lock from shared state example (#499)
It's not necessary to explicitly take the lock to print it.
2023-03-12 10:48:52 +01:00
Matt Smith
916c297d8c
Remove explicit typing in Mutex example (#405)
Example contained unnecessary explicit type info for the vector in Mutex v. Rust will magically do the needful conversions for us. Code looks cleaner/simpler without the explicit typing.
2023-02-14 18:40:22 +01:00
Martin Geisler
c4bc10e31d
Inline variables printed with println! and friends (#315)
The course follows the style of inlining variable names where possible
in `println!` statements.
2023-02-09 07:48:18 +01:00
Andrew Walbran
5dd87192e8 Mention that Send and Sync are unsafe traits. 2023-01-27 17:34:31 +00:00
Andrew Walbran
81cf02ffbe Fix typos and details. 2023-01-27 17:34:31 +00:00
Andrew Walbran
cc402a7788 Add some speaker notes to concurrency chapter. 2023-01-27 17:34:31 +00:00
Davide Guerri
a0a1059c0d Verbose description of Sync-Send relationship
Add a verbose rationale of the statement:
  `T` is `Sync` if and only if `&T` is `Send`
2023-01-26 12:06:54 +00:00
Igor Petruk
b12a1cb320
Update example.md (#257)
Adding a possible solution to the example that
does not compile. The solution includes notes
with important parts.
2023-01-24 15:25:18 +01:00
Igor Petruk
7f178d6212
Update mutex.md (#256)
* Update mutex.md

Adding speaker notes why Rust `Mutex` has its design and mentioning briefly `RwLock`.

Someone from the audience can notice `unwrap()` in the code, it might be worth to have the answer in speaker notes.

* Apply suggestions from code review

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-01-24 08:43:27 +00:00
Igor Petruk
178d7104e6
Update channels.md (#254)
* Update channels.md

Adding speaker notes explaining why `send` and `recv` can fail.

* Explicitly mention that the channel is closed when the sender/receiver is dropped

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-01-24 08:35:48 +00:00
Igor Petruk
dc894b1e9d
Update arc.md (#255)
Adding more information about `Arc`: what it stands for, costs and that reference cycles can occur.
2023-01-23 10:57:10 +00:00
Igor Petruk
8107a0ea2b
Update scoped-threads.md (#253)
Adding speaker notes explaining why scoped threads work and what borrowing rules apply.
2023-01-23 10:56:32 +00:00
Igor Petruk
77a60d4101
Update send-sync.md (#258)
Adding notes that these traits are not to be implemented directly. Yet they are still to be used as normal traits in generic constraints.
2023-01-23 08:51:41 +01:00
Martin Geisler
e835ee6cdf Add notes to threads.md
From the discussion in #63.
2023-01-09 14:32:04 +01:00
Martin Geisler
c7eff6b85e
Merge pull request #55 from Arthur-Milchior/patch-5
Fix typo on Send+Sync page
2022-12-27 17:19:07 +01:00
Martin Geisler
4295b8da5c
Further refine language as per @QuineDot's idea 2022-12-27 17:17:38 +01:00
Martin Geisler
cc0c02aa14
Copy-editing on the shared state page
The access is to the specific `T` value found in the `Mutex<T>`.
2022-12-27 17:14:45 +01:00
Arthur Milchior
2b2e006417 Typo
Not sure of the intended meaning. At least the sentence is true and gramattically correct here
2022-12-24 20:39:48 -08:00
Arthur Milchior
94933b43f1
Typos 2022-12-24 20:23:43 -08:00
Andrew Pollack
d752b11694
Minor punctuation update (#11)
* Minor punctuation update

* Update sync.md
2022-12-21 17:41:58 +00:00
Martin Geisler
c212a473ba Publish Comprehensive Rust 🦀 2022-12-21 16:38:28 +01:00