原文:【译】Arc 在 Rust 中是如何工作的

原文标题:How Arc works in Rust 原文链接:https: medium.com DylanKerler how arc works in rust b acd a 公众号: Rust 碎碎念 翻译 by: Praying 原子引用计数 Arc 类型是一种智能指针,它能够让你以线程安全的方式在线程间共享不可变数据。我还没有发现能够很好地解释它的工作原理的文章,所以我决定尝试来写 ...

2020-11-19 14:21 4 932 推荐指数:

查看详情

】理解Rust的Futures(二)

原文标题:Understanding Futures in Rust -- Part 2 原文链接:https://www.viget.com/articles/understanding-futures-is-rust-part-2/ 公众号: Rust 碎碎念 翻译 ...

Thu Dec 24 00:31:00 CST 2020 3 693
】理解Rust的闭包

原文标题:Understanding Closures in Rust 原文链接:https://medium.com/swlh/understanding-closures-in-rust-21f286ed1759 公众号: Rust 碎碎念 翻译 by: Praying ...

Fri Nov 13 01:07:00 CST 2020 1 766
Rust-Rc和Arc

Rust的所有权机制,要求一个资源同一时刻有且只能有一个拥有所有权的绑定或&mut引用,目的为保证内存的安全。在大多数情况下,都没有问题,但是考虑以下情况: 在图数据结构,多个边可能会拥有同一个节点,该节点直到没有边指向它时,才应该被释放清理。 在多线程,多个线程可能会持有 ...

Wed Feb 23 07:15:00 CST 2022 0 1542
】理解Rust的局部移动

原文标题:Understanding Partial Moves in Rust 原文链接:https://whileydave.com/2020/11/30/understanding-partial-moves-in-rust/ 公众号: Rust 碎碎念 翻译 ...

Wed Dec 02 19:39:00 CST 2020 0 487
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM