ITADN

Mutex<UnsafeCell>是否冗余?

#3ClosedLaoLittle 创建于 2024-05-02
L
LaoLittlecommented
<img width="868" alt="Screenshot 2024-05-02 at 23 32 17" src="https://github.com/kgagag/tomato/assets/93422095/b61646eb-b5fd-4de3-a72b-ceb0d7d711e9"> Mutex本身就是具有内部可变性的结构,lock之后可获取mutable reference,请问再套一层unsafecell的意义在哪里呢?
关闭于 2024-05-02 4 条评论