I'm still enjoying the old Wrox “C# Threading Handbook“ I just wish it was still supported. I kinda wish they would update the whole “Handbook“ series for VS2005. The only problem is that their original price point was a little high. There were something 8 or 12 books in the series, and I've had no problem paying $5 - $13 dollars for them used. And I'd probably be willing to go $20 - $25 on them new, but the list price in 2003 for the 260 page threading handbook was $40.00. From a publishing standpoint, I can see why the series died.
Anyway, on to today's “C# Threading Handbook“ errata.
Found a neat bug in chapter 2 while working on pausing a thread.
The code in the book has the pause code wrapped by this if statement
if (primeNumberThread.ThreadState == ThreadState.Running)
and that would be well and good, assuming that this example code wasn't spending most of it's time in a sleep mode so that the programmer had some time to see this cool threading stuff work.
The line of code should be
if( primeNumberThread.ThreadState == ThreadState.Running
||
primeNumberThread.ThreadState == ThreadState.WaitSleepJoin)