Skip to content

Conversation

@KeenS
Copy link
Member

@KeenS KeenS commented Jul 16, 2016

No description provided.

@KeenS
Copy link
Member Author

KeenS commented Dec 12, 2016

@tatsuya6502 レビューお願いします。
そこそこ変更料があります。

@KeenS KeenS changed the title [WIP] 5.6 Concurrency 5.6 Concurrency Dec 12, 2016
@tatsuya6502 tatsuya6502 self-requested a review January 23, 2017 15:07
@tatsuya6502 tatsuya6502 added this to the 1.9 milestone Jan 24, 2017
@tatsuya6502
Copy link
Member

tatsuya6502 commented Jan 25, 2017

Copy link
Member

@tatsuya6502 tatsuya6502 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KeenS 2点コメントしました。ご確認をお願いします。


<!-- Calling `clone()` on an `Rc<T>` will return a new owned reference and bump the -->
<!-- internal reference count. We create one of these for each thread: -->
`Rc<T>` に対して `clone()` を呼ぶと新たな所有権を持った参照を返し、内部の参照カウント数を増やします。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

細かい話ですが、reference count の訳が、「リファレンスカウント」と「参照カウント」の2つに揺れています。対訳表では「参照カウント」になっていますので、そちらに統一するのがよいかと思います。

ただ、ひょっとすると、Rc が "reference count" の頭文字であることがわかるように、あえて「リファレンスカウント」としているのでしょうか? もしそうなら、たとえば、以下のようにするのはどうでしょうか?(さらに、"of its name" も取り入れてみました)

通常、この用途には `Rc<T>` を使います。これは所有権の共有を提供する参照カウントの型です。
実行時にある程度の管理コストを払って、値への参照の数をカウントします。
なので名前に参照カウント(reference count) が付いているのです。

`Rc<T>` に対して `clone()` を呼ぶと新たな所有権を持った参照を返し、内部の参照カウント数を増やします。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

参照カウントとすべきところですね。直します。


<!-- In essence, `Arc<T>` is a type that lets us share ownership of data _across -->
<!-- threads_. -->
要点は `Arc<T>`_スレッド間_ で所有権を共有可能にする方ということです。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「方」→「型」

@KeenS
Copy link
Member Author

KeenS commented Jan 30, 2017

指摘箇所以外にももう1つ参照カウントがリファレンスカウントになってる箇所があったので修正しました。

Copy link
Member

@tatsuya6502 tatsuya6502 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KeenS 修正ありがとうございました。レビューOKですので、マージします。

おつかれさまでした!

@tatsuya6502 tatsuya6502 merged commit fcdfd0b into rust-lang-ja:master Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants