IntroductionThis is an excellently produced book. It has few typographical errors, the writing is generally clear and concise, and the information is correct. Even better, though, is the complete absence of the word 'cool'.
TextThe book is split into three parts: 'Threads in Action', 'Multithreading Tools and Tricks' and 'Multithreading in Real World Appications' .
'Threads in Action' is a thorough introduction into threads as a concept; what they do; how they work; what problems face developers when using them. Most of the functionality of Win32 that pertains to threads is described in some detail (thread creation and termination, kernel synchronisation objects, over-lapped I/O etc.). The authors also describe the Dining Philosophers problem, and present a solution on the CD-ROM. They claim that this is the best discussion of the problem ever, because you can watch the Philosophers eat. Personally I could do without that particular treat, but each to their own.
'Multithreading Tools and Tricks' will disappoint some people. Although the section starts well with a chapter that presents the Readers/Writers lock and explains the need for the
volatilekeyword in C++, it soon disappears into Microsoft specific information. For me this was useful and interesting, but just how happy a Borland user will be when presented with information about Visual C++ 4.2 or the MFC I wouldn't like to say.
The chapters on GDI/Window management, Debugging and Interprocess Communication should be of interest to all Windows programmers (though even these have nuggets of Microsoft specific stuff) and there is a generally useful description of how and when DLL entry procedures get called in the chapter on Building DLLs.
'Multithreading in Real World Applications' is an unlikely title for the final (and most disappointing) part of this book. The chapter on Planning an Application is very basic (how much can you cover in 11 pages?) and the other two chapters deal with ISAPI and COM respectively. Having never used ISAPI I can't comment on that chapter. The COM chapter is at best a brief intro and anyone with a real interest should refer to a more detailed text. Either of the Microsoft Press books(Inside OLE and Inside COM) or relevant Microsoft Systems Journal articles would help.
GrumblesAlthough I think this is a very useful book I do have some quibbles with it (apart from those described above). The first is that, whatever else it is, this book is not a 'Complete Guide to Threads'. Anyone who is going to use threads in an industrial application is going to need to know about more than is covered in this book. Whenever the text touches on a topic of advanced interest the statement 'This book will not cover this topic' appears. Treat this book as an introduction to threads and you can't go far wrong (especially if you stick to part 1 'Threads in Action').
I find the highlighted sidebars annoying. Specifically, I would have preferred a chapter that contrasted the threading model of Win32 with that of UNIX, rather than occasional comments scattered throughout the text.
The text covers the kernel synchronisation objects, but it mentions only two of the classic problems of multiple threads (the Dining Philosophers and the Readers/Writers lock). Before embarking on any project that uses threads to do actual work it would be instructive to seek out literature that covers these problem areas in greater detail. For NT users I recommend a look at Multithreaded Programming with Windows NT by T.Q. Pham and P.K. Garg (Prentice Hall).
There is no mention of Fibers (a form of lightweight, application scheduled thread). Though I have never needed to use them, I am told that they may be important for porting software form UNIX. (There's an MSDN article about it, but I don't have the reference to hand).