原文:【譯】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