Many Windows developers still write code as if their application is a single entity that, while it is running, has complete control of all system resources. This legacy from the days of DOS means that developers frequently fail to take advantage of Win32's support of multiple threads of execution to improve their application's performance or to enhance its functionality. For instance, a main thread can handle interactions with the user, while a background "worker" thread can handle repainting the application window or performing some background calculations. But multithreaded programming means more than adding threads; it also requires that the code be thread-safe.Win32 Multithread Programming explains the concepts of multithreaded programs, thus providing the developer with the knowledge necessary to skillfully construct efficient and complex applications. From basic thread synchronization using mutexes and semaphores, to advanced topics like creating reusable thread pools or implementing a deferred processing queue, the book uses real-world applications and carefully constructed examples to illustrate the principles of multithreaded programming. Some of the topics include:
How the Windows operating systems handle threads
Multithreading primitives in the Win32 API
Techniques for generating thread-safe dynamic link libraries
Advanced techniques for thread synchronization
Basic scenarios for synchronizing threads
Common designs for building multithreaded user interfaces
The CD-ROM accompanying the book features Mcl, the authors' C++ class library for multithreaded programming, which both wraps multithreaded API functions and easily supports more complex multithreaded scenarios. For programmers using MFC, an additional library, Mcl4Mfc, is included for MFC compatibility.Win32 Multithread Programming is an essential resource for any developer interested in learning about Win32 multithreaded programming in order to create high-performance, effective applications.
Aaron Michael Cohen started programming computers as a hobby in 1977, on an RCA 1802 single board microcomputer. While attending medical school in the early '80s, he explored numerous computer platforms (in his spare time!) including the Atari 800, the Macintosh, and the IBM PC. Realizing his greatest talents lay in computer programming, he decided to leave medicine and pursue a career in software development. His first jobs involved computer based medical imaging, which lead to work on high-quality image and video compression. Currently, Aaron is employed at Intel Corporation developing video teleconferencing systems in C and C++ on Windows 95 and NT. He has an undergraduate background in engineering and holds an M.D. from the University of Michigan.
Mike Woodring has been programming retail Windows applications, DLLs, and device drivers on Intel architecture platforms since the release of Windows 3.0. As a systems software engineer at Intel, he developed realtime ISDN telecommunications software in C++ for telephony, Internet, and desktop video conferencing products. Currently, he works as an independent consultant and teaches courses on Win32 programming. Mike holds a bachelor's degree in computer science from Montana State University.
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal featured on the cover of Win32 Multithreaded Programming is a Portuguese man-o'-war (genus Physalia). This colonial warm-water creature is found across the globe, but is most common in tropical regions of the Pacific and Indian Oceans, as well as the Gulf Stream of the northern Atlantic. The Portuguese man-o'-war consists of a group of polyps, individual unisexual organisms with specific cooperative functions. The body is formed of a bladder like, gas-filled sack ranging from 9-30 centimeters long, which may extend up to 15 centimeters above the water. This sack is tinted blue, pink, or violet, and is filled with a mixture of nitrogen, oxygen, and argon. The crest of the body serves the man-o'-war as a sail, as they have no active means of transport; sometimes as much as a thousand of the colonies are carried together by gusts of wind. Like its namesake, the Portuguese man-o'-war carries a formidable weapon. Beneath its body hang tentacles of up to 50 meters in length, containing stinging cells called nematocysts that paralyze small prey, which is then digested. Though the man-o'-war does not attack humans, victims frequently swim into the tentacles or touch them on the shore, where the toxin remains active. The sting can cause severe pain, fever, nausea, respiratory and heart weakness, and welts on the skin, but deaths are rare. A species of fish, somewhat resistant to the poison, often lives amongst and feeds on the Portuguese man-o'-war's tentacles, but is still occasionally paralyzed and eaten. Edie Freedman designed the cover of this book, using a 19th-century engraving from the Dover Pictorial Archive. The cover layout was produced with Quark XPress 3.3 using the ITC Garamond font. Whenever possible, our books use Rep KoverTM, a durable and flexible lay-flat binding. If the page count exceeds RepKover's limit, perfect binding is used.The inside layout was designed by Edie Freedman and Nancy Priest and implemented in FrameMaker 5.0 by Mike Sierra. The text and heading fonts are ITC Garamond Light and Garamond Book. The illustrations that appear in the book were created in Macromedia Freehand 7.0 by Robert Romano. The CD label was designed by Hanna Dyer. This colophon was written by Nancy Wolfe Kotary.