File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 3636* [ 巻き戻し] ( unwinding.md )
3737 * [例外安全性](exception-safety.md)
3838 * [Poisoning](poisoning.md)
39- * [ Concurrency ] ( concurrency.md )
39+ * [ 並行性 ] ( concurrency.md )
4040 * [Races](races.md)
4141 * [Send and Sync](send-and-sync.md)
4242 * [Atomics](atomics.md)
Original file line number Diff line number Diff line change 1+ <!--
12# Concurrency and Parallelism
3+ -->
24
5+ # 並行性と並列性
6+
7+ <!--
38Rust as a language doesn't *really* have an opinion on how to do concurrency or
49parallelism. The standard library exposes OS threads and blocking sys-calls
510because everyone has those, and they're uniform enough that you can provide
611an abstraction over them in a relatively uncontroversial way. Message passing,
712green threads, and async APIs are all diverse enough that any abstraction over
813them tends to involve trade-offs that we weren't willing to commit to for 1.0.
14+ -->
15+
16+ 言語としての Rust には、* 本当に* 、どのように並行性や並列性を実現するかについての
17+ 信条がありません。標準ライブラリは、 OS のスレッドやシステムコールのブロックを
18+ 公開しています。なぜなら皆これらを持っていて、そして十分統一されているために、
19+ 比較的反論の起きないような、これらに対する抽象化を提供できるからです。メッセージパッシング、
20+ グリーンスレッド、そして async の API はすべて、本当に異なっているため、
21+ これらに対するいかなる抽象化においても、バージョン 1.0 に対するコミットを
22+ 行ないたくないようなトレードオフを巻き込む傾向にあります。
923
24+ <!--
1025However the way Rust models concurrency makes it relatively easy to design your own
1126concurrency paradigm as a library and have everyone else's code Just Work
1227with yours. Just require the right lifetimes and Send and Sync where appropriate
1328and you're off to the races. Or rather, off to the... not... having... races.
29+ -->
30+
31+ しかしながら、 Rust の並行性のモデルは比較的簡単に、ライブラリとして、自分自身の並行パラダイムを
32+ 設計することができ、そして、自分のコードと同じように、他の人のコードもちゃんと動かすことも出来ます。
33+ 必要なのは正しいライフタイムと、必要に応じて Send と Sync で、これですぐに書くことが出来ます。
34+ あるいは... 競合を... 起こさずに... 済みます。
You can’t perform that action at this time.
0 commit comments