Skip to content

Commit

Permalink
fix: Thread to task and align message between Listing 22.10 and Table…
Browse files Browse the repository at this point in the history
… 22.3
  • Loading branch information
BenjaminMichaelis committed Mar 27, 2024
1 parent 0956625 commit 1e0febc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Errata.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ Zhou Jing | 3 | 110 | Replace `System.Value<T1>` with `System.ValueTuple<T1>` i
Zhou Jing | 3 | 102 | Change Listing 2.18 to " the Working with Strings listing in Chapter 2 (Listing 2.24)" in "This listing differs from Listing 2.18 in two ways"
Zhou Jing | 3 | 102 | Changed 'restrictive' to 'less restrictive' in "In each of these cases, the variable declaration is restrictive because the variable may be assigned."
Zhou Jing | 23 | 1077 | Change "Point Declaration" to "Pointer Declaration" in mindmap
Zhou Jing | 22 | 1074 | Change "Chapter 19" to "Chapter 20" in "we pointed out in Chapter 19"
Zhou Jing | 22 | 1074 | Change "Chapter 19" to "Chapter 20" in "we pointed out in Chapter 19"
Zhou Jing | 22 | 1065 - 1066 | Changed 'Thread' to 'Task' and "Application exiting" to "Application shutting down"
4 changes: 2 additions & 2 deletions src/Chapter22.Tests/Listing22.10.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ public void MainTest()
const string expected = @"Application started....
Starting task....
DoWork() started....
Waiting while thread executes...
Waiting while task executes...
DoWork() ending....
Thread completed
Task completed
Application shutting down....";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(
Expand Down
4 changes: 2 additions & 2 deletions src/Chapter22/Listing22.10.WaitingForManualResetEventSlim.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ public static void Main()
// Block until DoWork() has started
_DoWorkSignaledResetEvent.Wait();
Console.WriteLine(
" Waiting while thread executes...");
"Waiting while task executes...");
_MainSignaledResetEvent.Set();
task.Wait();
Console.WriteLine("Thread completed");
Console.WriteLine("Task completed");
Console.WriteLine(
"Application shutting down....");
}
Expand Down

0 comments on commit 1e0febc

Please sign in to comment.