Errata

Concurrency in C# Cookbook

Errata for Concurrency in C# Cookbook

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed, PDF
Page 4
2nd paragraph following the example

The word "whatever" is misspelled.
"The first synchronous portion executes on whetever thread calls the method, ..."

Note from the Author or Editor:
Replace "The first synchronous portion executes on whetever thread calls
the method" with "The first synchronous portion executes on whatever thread calls the method"

Doug Beeman  Apr 12, 2017 
Printed
Page 5
last paragraph

"artificailly" should be "artificially"

Ed Ball  Nov 19, 2014 
Printed, PDF
Page 7
last paragraph before section 1.3

The word "the" is repeated.
"...I recommend reading at least the the async overview..."

Note from the Author or Editor:
Change "I recommend reading at least the the" to "I recommend reading at least the"

Doug Beeman  Apr 12, 2017 
Printed, PDF
Page 19
Table 2-1

Title of column 2 is "Dataflow support", a copy/paste error. It should be "async support"

Note from the Author or Editor:
The first page of Chapter 2 "Async Basics", Table 2-1 "Platform support for async", the title of the second column should be changed from "Dataflow support" to "Async support"

Eric Lawrence  Jan 19, 2015 
Other Digital Version
19
second paragraph

Kindle version, location 19, Preface, 2nd paragraph:

"developement" should be "development".

Note from the Author or Editor:
This is a typo in the 1st edition. It has already been fixed in the 2nd edition.

Matt R  Jan 01, 2019 
Printed, PDF
Page 25
2nd code example

Task task1 = Task.FromResult(3);
Task task2 = Task.FromResult(5);
Task task3 = Task.FromResult(7);

int[] result = Task.WhenAll(task1, task2, task3);

This code doesn't compile. It should be (note, Task<int> instead of Task):

Task<int> task1 = Task.FromResult (3);
Task<int> task2 = Task.FromResult (5);
Task<int> task3 = Task.FromResult (7);

int[] results = await Task.WhenAll(task1, task2, task3);


Note from the Author or Editor:
This is page 23 in my PDF.

Change:
Task task1 = Task.FromResult(3);
Task task2 = Task.FromResult(5);
Task task3 = Task.FromResult(7);

to:
Task<int> task1 = Task.FromResult(3);
Task<int> task2 = Task.FromResult(5);
Task<int> task3 = Task.FromResult(7);

Decriptor  Dec 11, 2018 
PDF
Page 27
2rd paragraph

The code currently awaits each task in sequence order, even though the second task in
the sequence is the first one to complete.

should be:

The code currently awaits each task in sequence order, even though the thierd task in
the sequence is the first one to complete.

SchumiVettel  Jan 08, 2017 
Printed
Page 28
discussion

The discussion of abandoned tasks would be a good place to talk about TaskScheduler.UnobservedTaskException, and perhaps the fact that an unobserved exception would crash the app before .NET 4.5.

Note from the Author or Editor:
Page 26 (recipe 2.5) second paragraph of Discussion. The last sentence should be changed from "Any exceptions from those abandoned tasks will also be ignored." to "Any exceptions from those abandoned tasks are eventually sent to TaskScheduler.UnobservedTaskException, and then ignored."

Ed Ball  Nov 24, 2014 
Other Digital Version
39
4th paragraph

Kindle version, location 39, 4th paragraph of "Why I Wrote This Book".

"concurreny" should be "concurrency".

Note from the Author or Editor:
This is a typo in the 1st edition. It has already been fixed in the 2nd edition.

Matt R  Jan 01, 2019 
Printed
Page 60
2nd paragraph

"operator that is" should be "operator is"

Note from the Author or Editor:
Page 58 (last Discussion paragraph of recipe 5.1), "This operator that is not necessary in most situations" should read "This operator is not necessary in most situations".

Ed Ball  Nov 20, 2014 
Printed
Page 60
Last paragraph of 5.1

"Rx provides an operator will control the context for subscribing and unsubscribing: SubscribeOn. This operator that is not necessary in most situations..."
should be
"Rx provides an operator that will control the context for subscribing and unsubscribing: SubscribeOn. This operator is not necessary in most situations..."

Note from the Author or Editor:
On page 58, change

"Rx provides an operator will control the context for subscribing and unsubscribing: SubscribeOn. This operator that is not necessary in most situations"

to

"Rx provides an operator that will control the context for subscribing and unsubscribing: SubscribeOn. This operator is not necessary in most situations"

Doug Beeman  Jun 19, 2017 
Printed, PDF
Page 86
second paragraph of discussion

There's an errant comma in the sentence "pass all arguments that BeginOperation, takes"

Note from the Author or Editor:
In the second paragraph of Discussion in Recipe 7.2 Async Wrappers for Begin/End Methods, the penultimate sentence should be changed from "Next, pass all arguments that BeginOperation, takes except for the last AsyncCallback and object arguments." to "Next, pass all arguments that BeginOperation takes, except for the last AsyncCallback and object arguments."

Eric Lawrence  Jan 19, 2015 
PDF
Page 96
Solution section

Stacks are described as FIFO, and Queues are described as FILO. This is backwards, stacks are FILO and Queues are FIFO.

Note from the Author or Editor:
"Stacks are a first-in, first-out data structure." should read "Stacks are a first-in, last-out data structure." (pg 96)

"Queues are similar to stacks, except they are a first-in, last-out data structure." should read "Queues are similar to stacks, except they are a first-in, first-out data structure." (pg 97)

Scott S  May 29, 2014  Oct 31, 2014
Printed, PDF
Page 112
6th paragraph

When describing the BufferBlock<T> the text states:
If the queue is completed, then DequeueAsync will throw InvalidOperationException.

But DequeueAsync is not a method on BufferBlock<T>, it should be ReceiveAsync (as is printed correctly in the code example below):
If the queue is completed, then ReceiveAsync will throw InvalidOperationException.

Note from the Author or Editor:
On page 110, the sentence "If the queue is completed, then DequeueAsync will throw" should read "If the queue is completed, then ReceiveAsync will throw"

David De Geyter  Aug 21, 2014  Oct 31, 2014
Printed, PDF
Page 116
second paragraph

The method name OutputAvailableAsync is misspelled as OutputAvailbleAsync

Note from the Author or Editor:
In the last text paragraph of the Solution in Recipe 8.9 Asynchronous Stacks and Bags (pg 114 in PDF; pg 116 printed), the first sentence should be changed from "The example consumer code uses OutputAvailbleAsync" to "The example consumer code uses OutputAvailableAsync".

Eric Lawrence  Jan 19, 2015 
Printed, PDF
Page 137
first paragraph

"responsive" is misspelled as "reponsive"

Note from the Author or Editor:
In the first paragraph of Chapter 10 "Functional-Friendly OOP" (page 135 PDF / 137 printed), the end of the first sentence "end-user applications must be more reponsive than ever." should read "end-user applications must be more responsive than ever."

Eric Lawrence  Jan 19, 2015 
Printed, PDF
Page 137
first paragraph of solution

"multiplies" is misspelled "multiples"

Note from the Author or Editor:
In the second sentence of the first paragraph of the Solution section of Recipe 12.4 Dataflow Synchronization Using Schedulers, the wording "the following code creates a dataflow mesh that multiples all of its input values" should be "the following code creates a dataflow mesh that multiplies all of its input values".

Eric Lawrence  Jan 19, 2015 
Printed
Page 165
discussion

It might be good to mention Montior.Pulse/Wait here, at least in passing.

Note from the Author or Editor:
Page 163, last Discussion paragraph of recipe 11.3. The sentence "IfManualResetEventSlim doesn’t suit your needs, consider AutoResetEvent, CountdownEvent, or Barrier." should read "IfManualResetEventSlim doesn’t suit your needs, consider Monitor, AutoResetEvent, CountdownEvent, or Barrier."

Ed Ball  Nov 24, 2014 
Printed, PDF
Page 171
2nd to last paragraph

The last occurrence SynchronizationContext is misspelled (the z and the i are juxtaposed).

Note from the Author or Editor:
On page 169, in the Solution of 12.2, change

"SynchronziationContext"

to

"SynchronizationContext"

Doug Beeman  Sep 14, 2017