Skip to Content
Async Rust ―高いパフォーマンスと安全性を両立するRustによる非同期処理
book

Async Rust ―高いパフォーマンスと安全性を両立するRustによる非同期処理

by Maxwell Flitton, Caroline Morton, 中田 秀基
July 2025
Intermediate to advanced
284 pages
4h 4m
Japanese
O'Reilly Japan, Inc.
Content preview from Async Rust ―高いパフォーマンスと安全性を両立するRustによる非同期処理

1章非同期プログラミング入門

ソフトウェアエンジニアは絶え間ないハードウェア性能の向上によって長年甘やかされていた。低速のアルゴリズムやありあわせの手法や遅いプログラミング言語を使用することの言い訳として、「計算パワーを注ぎ込めば済む」とか「プログラムを書いている時間は読んでいる時間よりも高価だ」というような決まり文句が使われてきた。しかし昨今では、複数のプロセッサメーカから半導体の進歩が2010年以降停滞していることが報告されている。2022年にNVIDIAのCEO、Jensen Huangが「ムーアの法則は死んだ」と述べて話題になったが、それもこの流れの1つだ。ソフトウェアに対する要求が増大している。特にマイクロサービスなどではシステム内でI/O呼び出しの回数が増大しているので、資源をより効率的に使用しなければならない。

ここで重要になるのが非同期プログラミングだ。非同期プログラミングを用いれば、CPUのコア数を増やさずとも性能を向上させることができる。非同期プログラミングを用いると、サーバからのレスポンスをタスクがただ待っているような時間があるようなら、複数のタスクを1つのスレッドでうまく扱うことができる。

我々の日々の生活は非同期だ。例えば、洗濯を考えてみよう。洗濯機に洗濯物を入れた後、ただ座って何もしないで待っていることはない。その間に何か他のことをする。コンピュータやプログラムを効率的に動作させたければ、非同期プログラミングを受け入れなければならない。

腕まくりして非同期プログラミングの藪に突入する前に、コンピュータの文脈における非同期の位置付けを理解しておく必要がある。本章では、スレッドとプロセスの動作を概説し、I/O操作における非同期プログラミングの効率性を示す。 ...

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

Async Rust

Async Rust

Maxwell Flitton, Caroline Morton
Rust Web Programming

Rust Web Programming

Maxwell Flitton

Publisher Resources

ISBN: 9784814401185Publisher Website