Skip to content

Commit 1b25d48

Browse files
authored
Translate concurrency.md (#49)
1 parent 0201504 commit 1b25d48

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
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)

src/concurrency.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,34 @@
1+
<!--
12
# Concurrency and Parallelism
3+
-->
24

5+
# 並行性と並列性
6+
7+
<!--
38
Rust as a language doesn't *really* have an opinion on how to do concurrency or
49
parallelism. The standard library exposes OS threads and blocking sys-calls
510
because everyone has those, and they're uniform enough that you can provide
611
an abstraction over them in a relatively uncontroversial way. Message passing,
712
green threads, and async APIs are all diverse enough that any abstraction over
813
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+
行ないたくないようなトレードオフを巻き込む傾向にあります。
923

24+
<!--
1025
However the way Rust models concurrency makes it relatively easy to design your own
1126
concurrency paradigm as a library and have everyone else's code Just Work
1227
with yours. Just require the right lifetimes and Send and Sync where appropriate
1328
and you're off to the races. Or rather, off to the... not... having... races.
29+
-->
30+
31+
しかしながら、 Rust の並行性のモデルは比較的簡単に、ライブラリとして、自分自身の並行パラダイムを
32+
設計することができ、そして、自分のコードと同じように、他の人のコードもちゃんと動かすことも出来ます。
33+
必要なのは正しいライフタイムと、必要に応じて Send と Sync で、これですぐに書くことが出来ます。
34+
あるいは... 競合を... 起こさずに... 済みます。

0 commit comments

Comments
 (0)