𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Pro .NET 4 Parallel Programming in C# (Expert's Voice in .NET)

✍ Scribed by Adam Freeman


Publisher
Apress
Year
2010
Tongue
English
Leaves
329
Series
Expert's Voice in .NET
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Great book, reommended even if you are a newbie on parallel programming. The examples are quite illustrative, close to real world applications. The only reason for rating it as 4 stars it's because the print/paper quality of Apress books it's not as good as it was a few years ago.

✦ Table of Contents


Apress - Pro .Net 4 Parallel Programming in C Sharp (2010) (ATTiCA)......Page 1
Contents at a Glance......Page 5
Contents......Page 6
About the Author......Page 14
About the Technical Reviewer......Page 15
Acknowledgments......Page 16
Introducing .NET Parallel Programming......Page 18
What’s in This Book (and What Is Not)......Page 19
Deciding When to Go Parallel......Page 20
Understanding the Structure of This Book......Page 21
Getting the Example Code......Page 22
Summary......Page 23
Hello Task......Page 24
Creating and Starting Tasks......Page 25
Creating Simple Tasks......Page 26
Setting Task State......Page 28
Getting a Result......Page 30
Cancelling Tasks......Page 32
Monitoring Cancellation by Polling......Page 34
Monitoring Cancellation with a Delegate......Page 36
Monitoring Cancellation with a Wait Handle......Page 37
Cancelling Several Tasks......Page 39
Creating a Composite Cancellation Token......Page 40
Determining If a Task Was Cancelled......Page 41
Waiting for Time to Pass......Page 42
Using a Cancellation Token Wait Handle......Page 43
Using Classic Sleep......Page 44
Using Spin Waiting......Page 46
Waiting for Tasks......Page 47
Waiting for a Single Task......Page 48
Waiting for Several Tasks......Page 50
Waiting for One of Many Tasks......Page 51
Handling Exceptions in Tasks......Page 52
Handling Basic Exceptions......Page 53
Using an Iterative Handler......Page 54
Reading the Task Properties......Page 56
Using a Custom Escalation Policy......Page 58
Executing Tasks Lazily......Page 60
Example......Page 62
Example......Page 63
Example......Page 64
Summary......Page 65
Sharing Data......Page 66
Going to the Races......Page 67
Creating Some Order......Page 68
Executing Immutably......Page 69
Executing in Isolation......Page 70
Defining Synchronization Primitives......Page 76
Using Synchronization Wisely......Page 77
Using Basic Synchronization Primitives......Page 78
Locking and Monitoring......Page 79
Using Interlocked Operations......Page 84
Using Spin Locking......Page 87
Using Wait Handles and the Mutex Class......Page 89
Acquiring Multiple Locks......Page 91
Configuring Interprocess Synchronization......Page 93
Using Declarative Synchronization......Page 95
Using the ReaderWriterLockSlim Class......Page 96
Using Recursion and Upgradable Read Locks......Page 100
Working with Concurrent Collections......Page 104
Using .NET 4 Concurrent Collection Classes......Page 105
ConcurrentQueue......Page 106
ConcurrentStack......Page 108
ConcurrentBag......Page 110
ConcurrentDictionary......Page 111
Using First-Generation Collections......Page 114
Using Generic Collections......Page 116
Example......Page 117
Multiple Locks......Page 118
Example......Page 119
Lock Acquisition Order......Page 120
Example......Page 121
Example......Page 122
Summary......Page 124
Coordinating Tasks......Page 126
Using Task Continuations......Page 127
Creating Simple Continuations......Page 128
Creating One-to-Many Continuations......Page 130
Creating Selective Continuations......Page 132
Creating Many-to-One and Any-To-One Continuations......Page 134
Canceling Continuations......Page 137
Handling Exceptions......Page 139
Creating Child Tasks......Page 143
Using Synchronization to Coordinate Tasks......Page 146
Barrier......Page 148
CountDownEvent......Page 153
ManualResetEventSlim......Page 156
AutoResetEvent......Page 158
SemaphoreSlim......Page 160
Using the Parallel Producer/Consumer Pattern......Page 163
Creating the Pattern......Page 164
Creating a BlockingCollection instance......Page 165
Creating the Producers......Page 166
Creating the Consumer......Page 167
Combining Multiple Collections......Page 169
Creating a Custom Scheduler......Page 173
Using a Custom Scheduler......Page 177
Example......Page 179
Example......Page 181
Example......Page 182
Example......Page 183
Example......Page 185
Example......Page 186
Summary......Page 189
Parallel vs. Sequential Loops......Page 190
Invoking Actions......Page 192
Using Parallel Loops......Page 193
Creating a Basic Parallel For Loop......Page 194
Creating a Basic Parallel ForEach Loop......Page 196
Setting Parallel Loop Options......Page 198
Breaking and Stopping Parallel Loops......Page 200
Handling Parallel Loop Exceptions......Page 204
Getting Loop Results......Page 205
Canceling Parallel Loops......Page 206
Using Thread Local Storage in Parallel Loops......Page 207
Performing Parallel Loops with Dependencies......Page 210
Selecting a Partitioning Strategy......Page 212
Using the Chunking Partitioning Strategy......Page 213
Using the Ordered Default Partitioning Strategy......Page 216
Creating a Custom Partitioning Strategy......Page 217
Writing a Contextual Partitioner......Page 218
Writing an Orderable Contextual Partitioner......Page 226
Solution......Page 231
Example......Page 232
Example......Page 233
Example......Page 234
Summary......Page 235
LINQ, But Parallel......Page 236
Using PLINQ Queries......Page 239
Using PLINQ Query Features......Page 242
Ordering Query Results......Page 243
Using Ordered Subqueries......Page 247
Performing a No-Result Query......Page 248
Managing Deferred Query Execution......Page 249
Controlling Concurrency......Page 251
Forcing Parallelism......Page 252
Limiting Parallelism......Page 253
Forcing Sequential Execution......Page 254
Handling PLINQ Exceptions......Page 255
Cancelling PLINQ Queries......Page 256
Setting Merge Options......Page 257
Using Custom Partitioning......Page 259
Using Custom Aggregation......Page 262
Generating Parallel Ranges......Page 263
Solution......Page 264
Confusing Ordering......Page 265
Sequential Filtering......Page 266
Summary......Page 267
Making Things Better When Everything Goes Wrong......Page 268
Avoiding Parallelizing Small Work Loads......Page 269
Making Simple Performance Comparisons......Page 270
Performing Parallel Analysis with Visual Studio......Page 273
Finding Parallel Bugs......Page 277
Debugging Program State......Page 278
Handling Exceptions......Page 282
Detecting Deadlocks......Page 284
Summary......Page 286
Using Parallel Quicksort......Page 288
The Code......Page 289
Using the Code......Page 290
The Code......Page 291
Using the Code......Page 292
The Code......Page 293
Using the Code......Page 294
Using a Parallel Cache......Page 295
Using the Code......Page 296
The Code......Page 297
Using the Code......Page 298
Using the Code......Page 299
The Code......Page 300
Using the Code......Page 301
The Code......Page 302
Using the Code......Page 304
The Code......Page 305
Using the Code......Page 306
The Code......Page 307
Using the Code......Page 308
The Code......Page 309
Using the Code......Page 310
Β¦C......Page 312
Β¦......Page 314
Β¦F......Page 315
Β¦I......Page 316
Β¦L......Page 317
Β¦O......Page 318
Β¦S......Page 320
Β¦......Page 323
Β¦W......Page 327


πŸ“œ SIMILAR VOLUMES


Pro .NET 4 Parallel Programming in C# (E
✍ Adam Freeman πŸ“‚ Library πŸ“… 2010 πŸ› Apress 🌐 English

Great book, reommended even if you are a newbie on parallel programming. The examples are quite illustrative, close to real world applications. The only reason for rating it as 4 stars it's because the print/paper quality of Apress books it's not as good as it was a few years ago.

Pro .NET 4 Parallel Programming in C# (E
✍ Adam Freeman πŸ“‚ Library πŸ“… 2010 πŸ› Apress 🌐 English

Great book, reommended even if you are a newbie on parallel programming. The examples are quite illustrative, close to real world applications. The only reason for rating it as 4 stars it's because the print/paper quality of Apress books it's not as good as it was a few years ago.

Pro .NET 4 Parallel Programming in C#
✍ Adam Freeman πŸ“‚ Library πŸ“… 2010 πŸ› Apress 🌐 English

Parallel programming has been revolutionised in .NET 4 providing, for the first time, a standardised and simplified method for creating robust, scalable and reliable multi-threaded applications. The Parallel Programming features of .NET 4 allow the programmer to create applications that harness the

Pro .NET 4 Parallel Programming in C#
✍ Adam Freeman (auth.) πŸ“‚ Library πŸ“… 2010 πŸ› Apress 🌐 English

<p><p>Parallel programming has been revolutionised in .NET 4, providing, for the first time, a standardised and simplified method for creating robust, scalable and reliable multi-threaded applications. The Parallel programming features of .NET 4 allow the programmer to create applications that harne

Pro .NET 4 Parallel Programming in C#
✍ Adam Freeman πŸ“‚ Library πŸ“… 2010 πŸ› Apress 🌐 English

Parallel programming has been revolutionised in .NET 4, providing, for the first time, a standardised and simplified method for creating robust, scalable and reliable multi-threaded applications. The Parallel programming features of .NET 4 allow the programmer to create applications that harness the

Pro .NET 4 Parallel Programming in C#
✍ Adam Freeman πŸ“‚ Library πŸ“… 2010 πŸ› Apress 🌐 English

Parallel programming has been revolutionised in .NET 4, providing, for the first time, a standardised and simplified method for creating robust, scalable and reliable multi-threaded applications. The Parallel programming features of .NET 4 allow the programmer to create applications that harness the