Skip to content

Commit 51ffe72

Browse files
committed
arc
1 parent b00d983 commit 51ffe72

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

homework/doc/arc.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ Follow [the Arc section of the Rustnomicon (the book on unsafe Rust)][nomicon-ar
2323

2424
Some food for thought on Rustnomicon's description:
2525
* Quiz: Why does `Arc<T> : Sync` require `T : Send`?
26+
* `Arc<Rc<u32>>`: if Rc is allowed, Rc can be sent to another thread, which is not thread-safe.
2627
* The [Layout section](https://doc.rust-lang.org/nomicon/arc-mutex/arc-layout.html) explains
2728
why [`NonNull`](https://doc.rust-lang.org/std/ptr/struct.NonNull.html) and `PhantomData` are necessary.
29+
to use covariant feature. to represent ownership semantics
2830
We don't care about them in this course and will not ask about them in the exams
2931
(it's quite interesting, though).
3032
* Their implementation uses `fence(Acquire)`, which we may not be able cover in the lecture due to time constraints.

homework/loom.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)