Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Thread to task and align message between Listing 22.10 and Table 22.3 #761

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading