Skip to Content
プログラミングRust 第2版
book

プログラミングRust 第2版

by Jim Blandy, Jason Orendorff, Leonora F. S. Tindall, 中田 秀基
January 2022
Intermediate to advanced
680 pages
11h 35m
Japanese
O'Reilly Japan, Inc.
Content preview from プログラミングRust 第2版

19章並列性

長い目で見ると、大きな並列プログラムを、任意の場所に値を保存でき、アドレスを任意に利用できるような、計算機に依存した言語で書くことは推奨できない。このようなプログラムを高い信頼性を持つようにすることは、不可能だからだ(複雑なハードウェア機構による補助があったとしても)。

−Per Brinch Hansen(1977)†1

[†1] 訳注:デンマーク出身のコンピュータ科学者。並列言語、分散オペレーティングシステムの研究で知られる。

通信のパターンは並列性のパターンだ。

−Whit Morriss

並列性に対する態度が、自身のキャリアの変遷によって変化するのはよくある話だ。

最初のうちは、並列コードを書くのは簡単で楽しい。スレッドやロック、キューなどの道具を使うのは簡単だ。確かに落とし穴はたくさんあるが、どこにあるかはわかっているので、ミスを犯さないように注意すればよい。

ある時点で、他人の書いたマルチスレッドコードをデバッグすることになり、ある種の人たちは並列コードを書くべきではない、という結論に至る。

さらに、その後自分で書いたマルチスレッドコードをデバッグするはめになる。

そして、経験によってマルチスレッドに対して、完全な冷笑主義ではないまでも、健全な懐疑主義を持つようになる。ときおり、明らかに正しいように見えるマルチスレッドのコードがまったくうまく動かない理由を説明した記事を見かける。これらの記事の心が麻痺するような詳細な説明によって、懐疑主義はさらに強固になる(これは、あの「メモリモデル」によるものだ)。しかし、最後には毎回のようにミスを犯すことなく実用的に使えると思われる並列実行手法に辿り着く。何でもこのイディオムに突っ込むことになる。そして、(本当に

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

プログラミングRust

プログラミングRust

Jim Blandy, Jason Orendorff, 中田 秀基
詳解 システム・パフォーマンス 第2版

詳解 システム・パフォーマンス 第2版

Brendan Gregg, 西脇 靖紘, 長尾 高弘
レガシーコードからの脱却 ―ソフトウェアの寿命を延ばし価値を高める9つのプラクティス

レガシーコードからの脱却 ―ソフトウェアの寿命を延ばし価値を高める9つのプラクティス

David Scott Bernstein, 吉羽 龍太郎, 永瀬 美穂, 原田 騎郎, 有野 雅士

Publisher Resources

ISBN: 9784873119786Other