Skip to Content
Concurrency in C# Cookbook、第 2 版
book

Concurrency in C# Cookbook、第 2 版

by Stephen Cleary
May 2025
Intermediate to advanced
254 pages
3h 28m
Japanese
O'Reilly Media, Inc.
Content preview from Concurrency in C# Cookbook、第 2 版

付録A. レガシー・プラットフォームのサポート

本書で取り上げる技術の多く は、古いプラットフォームもある程度サポートしている。これらのプラットフォームをサポートする必要があるという不運な状況に陥った場合、この付録の情報が、どの技術が利用可能かを判断する助けになるかもしれない。古いプラットフォームでこれらの技術を使うのは理想的とは言えないし、仮に動作するようになったとしても、長期的な解決策はコードのプラットフォーム・ターゲットを更新することだけであることを覚えておいてほしい。この付録は主に歴史的な参考資料であり、推奨するものではない。

表A-1は、さまざまなテクニックに対するレガシープラットフォームのサポートをまとめたものである。

表A-1. レガシープラットフォームのサポート
プラットフォーム 非同期 パラレル 反応性 データフロー 同時コレクション 不変性コレクション

.NET 4.5

ニューゲット

ニューゲット

ニューゲット

.NET 4.0

ニューゲット

ニューゲット

Windows Phone アプリ 8.1

ニューゲット

ニューゲット

ニューゲット

Windows Phone SL 8.0

ニューゲット

ニューゲット

ニューゲット

Windows Phone SL 7.1

ニューゲット

ニューゲット

シルバーライト5

ニューゲット

ニューゲット

レガシー・プラットフォームの非同期サポート

古いレガシープラットフォームでasync のサポートが必要な場合は、以下のNuGetパッケージをインストールする。 Microsoft.Bcl.Async.

警告

.NET 4.0上で動作するASP.NETでasync コードを有効にするには、Microsoft.Bcl.Async を使用しないこと!ASP.NETのパイプラインは.NET 4.5で更新され、asyncasync ASP.NETプロジェクトでは、.NET 4.5以降を使用する必要がある。Microsoft.Bcl.Async は非ASP.NETアプリケーション専用である。

表A-2. レガシー・プラットフォームの非同期サポート
プラットフォーム 非同期サポート

.NET 4.5

.NET 4.0

NuGetである:Microsoft.Bcl.Async

Windows Phone アプリ 8.1

Windows Phone SL 8.0

Windows Phone 7.1

NuGetである:Microsoft.Bcl.Async

シルバーライト5

NuGetである:Microsoft.Bcl.Async

Microsoft.Bcl.Async を使用する場合、DelayFromResultWhenAllWhenAny など、モダンなTask タイプのメンバーの多くがTaskEx タイプになる。

データフローのレガシープラットフォームサポート

TPL Dataflowを使用するには、NuGetパッケージをアプリケーションにインストールする。 System.Threading.Tasks.Dataflowをアプリケーションにインストールする。TPL Dataflowライブラリは、古いプラットフォーム向けのプラットフォームサポートに制限がある(表A-3)。

警告

古いMicrosoft.Tpl.Dataflow ...

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 in C# 5.0

Async in C# 5.0

Alex Davies

Publisher Resources

ISBN: 9798341650060