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 36
36
* [ 巻き戻し] ( unwinding.md )
37
37
* [例外安全性](exception-safety.md)
38
38
* [Poisoning](poisoning.md)
39
- * [ Concurrency ] ( concurrency.md )
39
+ * [ 並行性 ] ( concurrency.md )
40
40
* [Races](races.md)
41
41
* [Send and Sync](send-and-sync.md)
42
42
* [Atomics](atomics.md)
Original file line number Diff line number Diff line change
1
+ <!--
1
2
# Concurrency and Parallelism
3
+ -->
2
4
5
+ # 並行性と並列性
6
+
7
+ <!--
3
8
Rust as a language doesn't *really* have an opinion on how to do concurrency or
4
9
parallelism. The standard library exposes OS threads and blocking sys-calls
5
10
because everyone has those, and they're uniform enough that you can provide
6
11
an abstraction over them in a relatively uncontroversial way. Message passing,
7
12
green threads, and async APIs are all diverse enough that any abstraction over
8
13
them 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
+ 行ないたくないようなトレードオフを巻き込む傾向にあります。
9
23
24
+ <!--
10
25
However the way Rust models concurrency makes it relatively easy to design your own
11
26
concurrency paradigm as a library and have everyone else's code Just Work
12
27
with yours. Just require the right lifetimes and Send and Sync where appropriate
13
28
and 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