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 (#761)

Fixes #730
  • Loading branch information
BenjaminMichaelis committed Apr 4, 2024
1 parent 555cebb commit bea2811
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 @@ -36,4 +36,5 @@ Zhou Jing | 23 | 1105 | Change `Length = 10` in listing 23.20 to `Length = 12` t
Zhou Jing | 18 | 926-927 | Change 'LastName' references to be 'FirstName' in paragraphs
Jinhang He | 5 | 255 | Edit listing 5.20 to used `image[index]` for the second print statement
Zhou Jing | 18 | 908 | Change comment in Listing 18.21 to "Restrict the attribute to properties and fields" from "Restrict the attribute to properties and methods"
Zhou Jing | 23 | 1080 | Change "DWORD flProtect); // The type of memory allocation" to "// The type of memory protection"
Zhou Jing | 23 | 1080 | Change "DWORD flProtect); // The type of memory allocation" to "// The type of memory protection"
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 bea2811

Please sign in to comment.