1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-05-17 16:12:39 +02:00
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
..