Skip to content

Commit

Permalink
Update 3_Memory_Ordering.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Luv-Ray authored and fwqaaq committed Nov 4, 2023
1 parent b70b9bb commit 4c1e98e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 3_Memory_Ordering.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ fn main() {
}
```

> `Std::array::from_fn` 是一种执行一定次数并将结果收集到数组中的简单方法。
> `std::array::from_fn` 是一种执行一定次数并将结果收集到数组中的简单方法。
在这个示例中,10 个线程做了一些计算,并存储它们的结果到一个(非原子)共享变量中。每个线程设置一个原子布尔值,以指示数据已经通过主线程准备好读取,使用一个普通的 release-store。主线程等待半秒,检查所有 10 个布尔值以查看哪些线程已完成,并打印任何准备好的结果。

Expand Down

0 comments on commit 4c1e98e

Please sign in to comment.