Rust 037 SendとSync - 型がスレッド境界を越える条件 episode artwork

EPISODE · May 31, 2026 · 9 MIN

Rust 037 SendとSync - 型がスレッド境界を越える条件

from 聞き流しプログラミング言語学習 · host ますたーさん

第37章へようこそ。今日のテーマは、SendとSyncです。前章で、スレッドに値を渡すときは所有権ごと渡すことを見ました。moveが、外側の値の所有権をクロージャへ移し、新しいスレッドへ持ち込む。ただし、すべての値がスレッド境界を越えてよいわけではありません。ある値をスレッドに渡すと、データ競合という危険が生じる場合がある。データ競合は、複数の流れが同じ値に同時に触れ、少なくとも一方が書き換えるときに起こる、結果の定まらない状態のことです。Rustは、この危険を実行してから気づくのではなく、コンパイルの時点で防ぐ。そのために、どの型がスレッド境界を越えてよいかを、型のうえで区別する。この区別を担うのが、SendとSyncという2つのトレイトです。今日扱うのは、SendとSyncがそれぞれ何を表すのか、これらがどう自動的に決まるのか、そして、なぜRcがこの境界を越えられないのか、という核心です。

Episode metadata supplied by the publisher feed · Published May 31, 2026

Embed this episode

NOW PLAYING

Rust 037 SendとSync - 型がスレッド境界を越える条件

0:00 9:33

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

No similar podcasts found.

Frequently Asked Questions

How long is this episode of 聞き流しプログラミング言語学習?

This episode is 9 minutes long.

When was this 聞き流しプログラミング言語学習 episode published?

This episode was published on May 31, 2026.

Can I download this 聞き流しプログラミング言語学習 episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!