Skip to content

Commit d58ec7e

Browse files
committed
Translate a paragraph
1 parent d4fff11 commit d58ec7e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/send-and-sync.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,21 @@ possible cause trouble by being incorrectly Send or Sync.
142142
してください。他のアンセーフなコードによって特別な意味を持ってしまった型のみが、
143143
不正な Send や Sync によって問題を引き起こしてしまう可能性があります。
144144

145+
<!--
145146
Most uses of raw pointers should be encapsulated behind a sufficient abstraction
146147
that Send and Sync can be derived. For instance all of Rust's standard
147148
collections are Send and Sync (when they contain Send and Sync types) in spite
148149
of their pervasive use of raw pointers to manage allocations and complex ownership.
149150
Similarly, most iterators into these collections are Send and Sync because they
150151
largely behave like an `&` or `&mut` into the collection.
152+
-->
153+
154+
生ポインタの使用者のほとんどは、 Send や Sync を継承できるよう、十分な抽象化の裏に
155+
生ポインタをカプセル化するべきです。例えば Rust の全ての標準コレクションは、
156+
アロケーションや複雑な所有権を操るために至るところで生ポインタを使用しているのにも関わらず、
157+
Send と Sync を実装しています (これらの型が Send と Sync を実装している型を保持している場合) 。
158+
同じように、これらのコレクションのほとんどのイテレータは、イテレータがコレクションに対して
159+
`&``&mut` のように振る舞っているために、 Send や Sync を実装しています。
151160

152161
TODO: better explain what can or can't be Send or Sync. Sufficient to appeal
153162
only to data races?

0 commit comments

Comments
 (0)