1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-05-18 16:33:09 +02:00

5 Commits

Author SHA1 Message Date
Frances Wingerter
ed023c8ad7 concurrency: demonstrate dynamic ownership with Arc
Ownership is the responsibility to free a value. Previously, `v` was
always freed by the main thread because it kept the original `Arc`
instance. It was difficult to explain why this example did not simply
use scoped threads instead.

Now we see that multi-threaded dynamic ownership with `Arc` results
in a dynamic decision of which thread will clean up a given value.
2025-05-06 14:46:15 -04:00
Martin Geisler
0f00434a0f
Simplify language on mutex page (#2440)
The “iff” phrasing has confused people in the past.
2024-10-18 09:04:10 +02:00
Frances Wingerter
dfd08ebf93
concurrency: avoid 1.. loops (#2280)
Fixes #2060. Note that this does not change the "blocking executor"
example because on that slide it is worthwhile to sleep for 1 * 10ms on
the first iteration and so on. But we shouldn't use one-indexed
inclusive loops when the only significant feature of the loop is its
iteration count.
2024-08-13 14:38:22 +00:00
Jonathan Daniel
1c964f6fe3
Fix a broken link and check internal links (#2195)
In #2153 I aimed to fix a link but broke it.
In this PR, I fix it and add
[`mdbook-linkcheck`](https://github.com/Michael-F-Bryan/mdbook-linkcheck)
to avoid future cases.

Some past fixes that could have been prevented, in addition to mine in
this PR:
* #811
* #2064
* #2146

Note:  
`mdbook-linkcheck` may also check external links with a configuration
change.
It can be beneficial to check also external links from time to time. I
ran it here and found 3 broken links.

Maintainers - sorry for the lack of a preceding issue. We can discuss it
here.
Some remaining work is to fix the outdated internal links in the
translations, not done here.
Let me know what you think about the proposed contribution.

This PR completes #1502.
2024-07-22 11:37:19 +00:00
Dustin J. Mitchell
face5af783
Update Concurrency course with times (#2007)
As I mentioned in #1536:

* Break into segments at approximately the places @fw-immunant put
breaks
 * Move all of the files into `src/concurrency`
 * Add timings and segment/session metadata so course outlines appear

There's room for more work here, including some additional feedback from
@fw-immunant after the session I observed, but let's do one step at a
time :)
2024-04-23 13:26:41 +00:00