Skip to content

Commit 8b5704b

Browse files
committed
Translate a paragraph
1 parent c31a318 commit 8b5704b

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
@@ -71,12 +71,21 @@ Major exceptions include:
7171
* `UnsafeCell` は Sync を実装していません (そしてそれ故に `Cell``RefCell` も同様です) 。
7272
* `Rc` は Send も Sync も実装していません (なぜなら参照カウントが共有され、これは同期されないからです) 。
7373

74+
<!--
7475
`Rc` and `UnsafeCell` are very fundamentally not thread-safe: they enable
7576
unsynchronized shared mutable state. However raw pointers are, strictly
7677
speaking, marked as thread-unsafe as more of a *lint*. Doing anything useful
7778
with a raw pointer requires dereferencing it, which is already unsafe. In that
7879
sense, one could argue that it would be "fine" for them to be marked as thread
7980
safe.
81+
-->
82+
83+
`Rc``UnsafeCell` は本当に根本的にスレッドセーフではありません。すなわち、
84+
これらは、同期されていない共有可変状態を実現できてしまうからです。しかしながら、
85+
生ポインタは、厳密に言えば、*リント*において、より一層スレッドアンセーフです。
86+
生ポインタで何か有益なことをしようとすれば、参照外しをする必要があるため、
87+
もう既にアンセーフです。その意味で、これらをスレッドセーフとしてマークしても
88+
"問題ない" と論じることも可能と言えるでしょう。
8089

8190
However it's important that they aren't thread safe to prevent types that
8291
contain them from being automatically marked as thread safe. These types have

0 commit comments

Comments
 (0)