按年被提到
20192019 · 2 次2026
编程语言与编译器›Rust 与内存安全·arXiv:1904.12210 · cs.DC

A Practical Analysis of Rust's Concurrency Story

Rust 并发故事的实践分析
Aditya Saligrama, Andrew Shen, Jon Gjengset · 2019

以实现一个并发无锁哈希表为例,剖析 Rust 类型系统在并发中的作用

开始阅读 ↗PDFalphaXiv 讨论
被提及 · 3 人首次 2019-04-30 · 最近 2022-04-09
3不同的人
3活跃月份
3讨论串
3被引(OpenAlex)

论文以实现一个并发无锁哈希表为案例,考察 Rust 的类型系统如何影响并发数据结构的开发与改进,以及当正确性依赖于类型系统无法直接表达的底层不变量(如无锁算法)时它如何适应。Rust 在类型系统中编码数据结构能否在线程间共享,使编译器拒绝没有锁或其他保护就直接修改共享状态的程序。作者称其公开的实现是 Rust 中最快的并发哈希表之一。

HN 为什么提它

输入里没有可用的评论摘录,只知道 3 个人在 3 个不同月份提及,具体立场无法判断。

其他难度 3 / 5约 40 分钟经得起时间
读之前最好知道
1Rust 所有权与 Send/Sync
2数据竞争与锁
3无锁(lock-free)数据结构
4哈希表

HN 书评

没有评论直接链到它;下面是它被提交的讨论串里回复最多的评论(不计入统计)
讨论串评论ordu · 2019-04

“> we found that it took some effort to remove these unwraps and replace them with match statements or the equivalent. You may choose to not use match expression. It can be as simple as: fn get_val() -> i64 { function_returning_result().unwrap_or(-1) } Or if println! there is really needed, then instead of unwrap_or is possible to use unwrap_or_else w…”

A Practical Analysis of Rust's Concurrency Story原评论 ↗
被提交为 story · 3 次