Muutke küpsiste eelistusi

E-raamat: Concurrency in C# Cookbook: Asynchronous, Parallel, and Multithreaded Programming

  • Formaat: 254 pages
  • Ilmumisaeg: 20-Aug-2019
  • Kirjastus: O'Reilly Media
  • Keel: eng
  • ISBN-13: 9781492054450
Teised raamatud teemal:
  • Formaat - EPUB+DRM
  • Hind: 40,37 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: 254 pages
  • Ilmumisaeg: 20-Aug-2019
  • Kirjastus: O'Reilly Media
  • Keel: eng
  • ISBN-13: 9781492054450
Teised raamatud teemal:

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

If you&;re one of many developers still uncertain about concurrent and multithreaded development, this practical cookbook will change your mind. With more than 85 code-rich recipes in this updated second edition, author Stephen Cleary demonstrates parallel processing and asynchronous programming techniques using libraries and language features in .NET and C# 8.0.

Concurrency is now more common in responsive and scalable application development, but it&;s still extremely difficult to code. The detailed solutions in this cookbook show you how modern tools raise the level of abstraction, making concurrency much easier than before. Complete with ready-to-use code and discussions about how and why solutions work, these recipes help you:

  • Get up to speed on concurrency and async and parallel programming
  • Use async and await for asynchronous operations
  • Enhance your code with asynchronous streams
  • Explore parallel programming with .NET&;s Task Parallel Library
  • Create dataflow pipelines with .NET&;s TPL Dataflow library
  • Understand the capabilities that System.Reactive builds on top of LINQ
  • Utilize threadsafe and immutable collections
  • Learn how to conduct unit testing with concurrent code
  • Make the thread pool work for you
  • Enable clean, cooperative cancellation
  • Examine scenarios for combining concurrent approaches
  • Dive into asynchronous-friendly object-oriented programming
  • Recognize and write adapters for code using older asynchronous styles
Preface ix
1 Concurrency: An Overview
1(18)
Introduction to Concurrency
1(2)
Introduction to Asynchronous Programming
3(5)
Introduction to Parallel Programming
8(3)
Introduction to Reactive Programming (Rx)
11(2)
Introduction to Dataflows
13(2)
Introduction to Multithreaded Programming
15(1)
Collections for Concurrent Applications
16(1)
Modern Design
17(1)
Summary of Key Technologies
17(2)
2 Async Basics
19(22)
2.1 Pausing for a Period of Time
19(2)
2.2 Returning Completed Tasks
21(3)
2.3 Reporting Progress
24(1)
2.4 Waiting for a Set of Tasks to Complete
25(2)
2.5 Waiting for Any Task to Complete
27(2)
2.6 Processing Tasks as They Complete
29(3)
2.7 Avoiding Context for Continuations
32(1)
2.8 Handling Exceptions from async Task Methods
33(2)
2.9 Handling Exceptions from async void Methods
35(2)
2.10 Creating a ValueTask
37(2)
2.11 Consuming a ValueTask
39(2)
3 Asynchronous Streams
41(14)
Asynchronous Streams and Task<T>
41(1)
Asynchronous Streams and IEnumerable<T>
41(1)
Asynchronous Streams and Task<IEnumerable<T>>
42(1)
Asynchronous Streams and IObservable<T>
42(1)
Summary
43(1)
3.1 Creating Asynchronous Streams
44(2)
3.2 Consuming Asynchronous Streams
46(2)
3.3 Using LINQ with Asynchronous Streams
48(3)
3.4 Asynchronous Streams and Cancellation
51(4)
4 Parallel Basic
55(10)
4.1 Parallel Processing of Data
55(2)
4.2 Parallel Aggregation
57(1)
4.3 Parallel Invocation
58(2)
4.4 Dynamic Parallelism
60(2)
4.5 Parallel LINQ
62(3)
5 Dataflow Basics
65(10)
5.1 Linking Blocks
65(2)
5.2 Propagating Errors
67(2)
5.3 Unlinking Blocks
69(1)
5.4 Throttling Blocks
70(1)
5.5 Parallel Processing with Dataflow Blocks
71(1)
5.6 Creating Custom Blocks
72(3)
6 System.Reactive Basics
75(12)
6.1 Converting NET Events
76(2)
6.2 Sending Notifications to a Context
78(2)
6.3 Grouping Event Data with Windows and Buffers
80(3)
6.4 Taming Event Streams with Throttling and Sampling
83(1)
6.5 Timeouts
84(3)
7 Testing
87(14)
7.1 Unit Testing async Methods
88(2)
7.2 Unit Testing async Methods Expected to Fail
90(2)
7.3 Unit Testing async void Methods
92(1)
7.4 Unit Testing Dataflow Meshes
93(2)
7.5 Unit Testing System.Reactive Observables
95(2)
7.6 Unit Testing System.Reactive Observables with Faked Scheduling
97(4)
8 Interop
101(16)
8.1 Async Wrappers for "Async" Methods with "Completed" Events
101(2)
8.2 Async Wrappers for "Begin/End" Methods
103(1)
8.3 Async Wrappers for Anything
104(2)
8.4 Async Wrappers for Parallel Code
106(1)
8.5 Async Wrappers for System.Reactive Observables
107(1)
8.6 System.Reactive Observable Wrappers for async Code
108(2)
8.7 Asynchronous Streams and Dataflow Meshes
110(2)
8.8 System.Reactive Observables and Dataflow Meshes
112(2)
8.9 Converting System.Reactive Observables to Asynchronous Streams
114(3)
9 Collections
117(28)
9.1 Immutable Stacks and Queues
119(2)
9.2 Immutable Lists
121(2)
9.3 Immutable Sets
123(2)
9.4 Immutable Dictionaries
125(2)
9.5 Threadsafe Dictionaries
127(2)
9.6 Blocking Queues
129(2)
9.7 Blocking Stacks and Bags
131(1)
9.8 Asynchronous Queues
132(3)
9.9 Throttling Queues
135(2)
9.10 Sampling Queues
137(2)
9.11 Asynchronous Stacks and Bags
139(2)
9.12 Blocking/Asynchronous Queues
141(4)
10 Cancellation
145(16)
10.1 Issuing Cancellation Requests
146(3)
10.2 Responding to Cancellation Requests by Polling
149(1)
10.3 Canceling Due to Timeouts
150(2)
10.4 Canceling async Code
152(1)
10.5 Canceling Parallel Code
153(1)
10.6 Canceling System.Reactive Code
154(2)
10.7 Canceling Dataflow Meshes
156(1)
10.8 Injecting Cancellation Requests
157(2)
10.9 Interop with Other Cancellation Systems
159(2)
11 Functional-Friendly OOP
161(16)
11.1 Async Interfaces and Inheritance
162(1)
11.2 Async Construction: Factories
163(2)
11.3 Async Construction: The Asynchronous Initialization Pattern
165(3)
11.4 Async Properties
168(3)
11.5 Async Events
171(3)
11.6 Async Disposal
174(3)
12 Synchronization
177(14)
12.1 Blocking Locks
182(2)
12.2 Async Locks
184(1)
12.3 Blocking Signals
185(2)
12.4 Async Signals
187(1)
12.5 Throttling
188(3)
13 Scheduling
191(6)
13.1 Scheduling Work to the Thread Pool
191(2)
13.2 Executing Code with a Task Scheduler
193(2)
13.3 Scheduling Parallel Code
195(1)
13.4 Dataflow Synchronization Using Schedulers
196(1)
14 Scenarios
197(18)
14.1 Initializing Shared Resources
197(3)
14.2 System.Reactive Deferred Evaluation
200(2)
14.3 Asynchronous Data Binding
202(2)
14.4 Implicit State
204(2)
14.5 Identical Synchronous and Asynchronous Code
206(2)
14.6 Railway Programming with Dataflow Meshes
208(2)
14.7 Throttling Progress Updates
210(5)
A Legacy Platform Support 215(4)
B Recognizing and Interpreting Asynchronous Patterns 219(8)
Index 227
Stephen Cleary is a developer who with extensive experience ranging from ARM firmware to Azure. He has contributed to open source from the very beginning, starting with the Boost C++ libraries, and has released several libraries and utilities of his own.