REVIEW - Multithreading Applications in Win32 - The Complete Guide to Threads


Title:

Multithreading Applications in Win32

The Complete Guide to Threads

Author:

Jim Beveridge, Robert Wiener

ISBN:

Publisher:

Addison-Wesley Professional (1997)

Pages:

368pp

Reviewer:

Seb Rose

Reviewed:

February 1998

Rating:

★★☆☆☆


Introduction

This 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'.

Text

The 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
volatile
keyword 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.

Grumbles

Although 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).

Summary

All in all this Multithreading Application in Win32 is an entirely worthwhile book that has a place on the bookshelf of any programmer working with Win32 threads, but especially if you are using Microsoft's Visual C++ and/or the MFC. It seems to me that both the introduction and this summary is at variance to the body of the review. - Francis

Book cover image courtesy of Open Library.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.