or
Sign in to turn on 1-Click ordering.
or
Amazon Prime free trial required. Sign up when you check out. Learn more
More Buying Choices
Have one to sell? Sell yours here
or
Get a £11.30 Amazon.co.uk Gift Card
C++ Concurrency in Action: Practical Multithreading
 
 
Tell the Publisher!
I’d like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

C++ Concurrency in Action: Practical Multithreading [Paperback]

Anthony Williams
4.0 out of 5 stars  See all reviews (1 customer review)
RRP: £33.99
Price: £28.89 & this item Delivered FREE in the UK with Super Saver Delivery. See details and conditions
You Save: £5.10 (15%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In stock.
Dispatched from and sold by Amazon.co.uk. Gift-wrap available.
Want guaranteed delivery by Wednesday, May 30? Choose Express delivery at checkout. See Details
Trade In this Item for up to £11.30
Trade in C++ Concurrency in Action: Practical Multithreading for an Amazon.co.uk gift card of up to £11.30, which you can then spend on millions of items across the site. Plus, get an extra £5 when you trade in books worth £10 or more until June 30, 2012. Trade-in values may vary (terms apply). Find more products eligible for trade-in.

Frequently Bought Together

C++ Concurrency in Action: Practical Multithreading + API Design for C++ + The C++ Standard Library: A Tutorial and Reference
Price For All Three: £104.78

Show availability and delivery details

Buy the selected items together

Customers Who Bought This Item Also Bought


Product details

  • Paperback: 528 pages
  • Publisher: Manning Publications; 1 edition (12 Mar 2012)
  • Language English
  • ISBN-10: 1933988770
  • ISBN-13: 978-1933988771
  • Product Dimensions: 22.9 x 18.5 x 3 cm
  • Average Customer Review: 4.0 out of 5 stars  See all reviews (1 customer review)
  • Amazon Bestsellers Rank: 26,347 in Books (See Top 100 in Books)

Product Description

Product Description

Summary

C++ Concurrency in Action is a reference and guide to the new C++ 11 Standard for experienced C++ programmers as well as those who have never written multithreaded code. This book will show you how to write robust multithreaded applications in C++ while avoiding many common pitfalls.

About the Technology

Multiple processors with multiple cores are the norm these days. The C++11 version of the C++ language offers beefed-up support for multithreaded applications, and requires that you master the principles, techniques, and new language features of concurrency to stay ahead of the curve.

About the Book

Without assuming you have a background in the subject, CC++ Concurrency in Action gradually enables you to write robust and elegant multithreaded applications in C++11. You'll explore the threading memory model, the new multithreading support library, and basic thread launching and synchronization facilities. Along the way, you'll learn how to navigate the trickier bits of programming for concurrency.

Written for C++ programmers who are new to concurrency and others who may have written multithreaded code using other languages, APIs, or platforms.

What's Inside
  • Written for the new C++11 Standard
  • Programming for multiple cores and processors
  • Small examples for learning, big examples for practice

====================

Table of Contents
  1. Hello, world of concurrency in C++!
  2. Managing threads
  3. Sharing data between threads
  4. Synchronizing concurrent operations
  5. The C++ memory model and operations on atomic types
  6. Designing lock-based concurrent data structures
  7. Designing lock-free concurrent data structures
  8. Designing concurrent code
  9. Advanced thread management
  10. Testing and debugging multithreaded applications

About the Author

Anthony Williams is a UK-based developer and consultant with many years experience in C++. He has been an active member of the BSI C++ Standards Panel since 2001, and is author or coauthor of many of the C++ Standards Committee papers that led up to the inclusion of the thread library in the new C++ Standard, known as C++11 or C++0x. He has been the maintainer of the Boost Thread library since 2006, and is the developer of the just::thread implementation of the C++11 thread library from Just Software Solutions Ltd. Anthony lives in the far west of Cornwall, England.


Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index | Back Cover
Search inside this book:

Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

What Other Items Do Customers Buy After Viewing This Item?


Customer Reviews

5 star
0
3 star
0
2 star
0
1 star
0
Most Helpful Customer Reviews
1 of 1 people found the following review helpful
Goo Introduction 23 May 2012
By J. Bond VINE™ VOICE
Format:Paperback
This is an excellent introduction to using the standard template library threading functionality, covering all the details, foils and benefits of doing things right.

The text however could be a little more concise in places, and the examples given are (obviously) only for STD C++11 compilers - which are available for Linux/Unix without a hitch, but currently Microsoft only have a smattering of features supported in their compiler. This is not the books fault, the fault of the book is not to point this out, not to help the reader perhaps find a suitable runtime environment in which to run the examples in the books.

Is gcc -std=c++0x sufficient?.... Will Visual Studio 2012 eventually have more support for the STD threading?... I think the book should have introduced the reader to this, I know its nit picking, but the author of the book is also the author of the boost threading library, boost are notorious for not really documenting their work, leaving the window open for books such as this very one to document how to do things. The new std threading standard is, for the most part, based on the boost threading model and the author make hooting mention of this, but does not start off with the most basic level - where and what to compile the examples with.

Don't let this detract from the book itself, its content is very good, just doubly so if you work out how/where to compile the examples given.
Comment | 
Was this review helpful to you?
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com:  3 reviews
19 of 20 people found the following review helpful
A useful text on multithreading in C++ 8 Mar 2012
By Alexandros Gezerlis - Published on Amazon.com
Format:Paperback
"C++ Concurrency In Action: Practical Multithreading" by Anthony Williams is the first book to come out on multithreading and concurrency in the new C++. Williams is currently the primary developer and maintainer of the Boost.Thread library, a writer of many proposals for the C++11 thread library, and has for a while now provided (for a price) its first complete implementation (just::thread).

The Good: at long last C++ is thread-aware and this book shows the reader how to harness this newfound power. Williams starts out by introducing a number of thread-related concepts, like mutexes, condition variables, futures, promises, and atomics. This is an example-based book, so every new topic is fleshed out in code. Having introduced these concepts, the author goes on to apply them by designing lock-based concurrent data structures (a stack, a queue, a lookup table, and a linked list). Williams also shows how to use atomic operations to create lock-free stacks and queues. The book then examines more involved topics like thread pools (for which C++17 will probably have built-in support, though Williams doesn't venture a guess) and is rounded out by a welcome overview of how to identify deadlocks, livelocks, data races, and so on. Given the thematic breakup of the chapters, as well as the the wealth of the material collected in the Appendices, this book will come in very handy as a reference. More specifically, Appendix B has a nice comparison of the new C++ multithreading facilities with Java threads, POSIX threads, and the Boost Thread library. Even better is Appendix D, a very useful 120-page reference of the C++11 thread library, which is more usable in digital form (as part of the ebook or the online version of the just::thread documentation). This volume is not a tutorial on C++11, but Williams uses a number of its facilities repeatedly (e.g. deleted and lambda functions, as well as auto, rvalue references, move constructors, and variadic templates) and then gathers them all up in Appendix A, along with other features (like constexpr functions and std::tuple). Given the current scarcity of decent material on C++11, the repeated use of new constructs means that Williams' book can also function as a practical introduction of sorts to the new language standard. From a more pragmatic perspective, it's worth pointing out that you can find the complete source code for the book on the publisher's website. Importantly, everyone who buys a paper copy of the book may also download a free e-book version. As I've written before, it is to be hoped that other publishers will follow Manning's example.

The Bad: parts of the book feel more like a reference than a tutorial. In the early chapters, when Williams is introducing things like mutexes, futures, etc from the C++ thread library (along with a couple of boost constructs) it feels like he's faced with a number of C++ entities for which he has to provide a raison d'etre, so he goes over them one by one. Thus, from the get-go "C++ Concurrency In Action" seems to implicitly assume that the reader is already comfortable with conceptual questions relating to concurrency, e.g. after finishing this book a reader would not know what a semaphore is -- this should be contrasted with David Butenhof's classic "Programming with POSIX threads". In all fairness, Williams does discuss conceptual issues in chapter 8 (of 10), but what he includes there is too little too late (on a related note, section 8.3.1 on matrix multiplication is just begging for some example code, especially given the unconventional notation used in the figure). Even so, most of the multithreading material is actually explained: perhaps not always masterfully (e.g. "if your roommate occupies the bathroom for a long time, it can be frustrating if you need to use it"), but explained nonetheless. Things are different when it comes to the grasp of C++ Williams assumes of the reader: he uses std::result_of and std::make_shared hundreds of pages before explaining them, though that's still better than the case of std::mem_fn, which is simply never discussed (note that all of these are TR1-related). Ditto for std::distance. Sometimes he also borders on bad practice, in one case using no access specifier for the base class when inheriting and, in another case, showing a function defined in a friend declaration of a class -- both times without explicitly saying he's doing so. (I won't dwell on outright errors, like using Template Argument Deduction for a class template, p. 244, and then assuming that you can deduce the return type, pp. 246, 247, 249.) Yes, a "good working knowledge of C++ is assumed" by Williams, but it's worth pointing out that in "Effective C++" Scott Meyers devotes two sentences to explaining even what a default constructor is. Given the book's list price, a little more attention to detail and a few extra explanations would have been welcome.

In summary, this book suffers from pedagogical flaws, but it is a good reference. Equally important, this is the first book on the subject and it's written by a knowledgeable person so, unless someone like Hans Boehm decides to write a similar volume, Williams will probably have no serious competition. (Herb Sutter's "Effective Concurrency", if it comes out, will most likely belong to the "second book on the subject" genre.) Thus, I cannot in good conscience give this volume less than four stars.

Alex Gezerlis
2 of 2 people found the following review helpful
Outstanding! 20 May 2012
By Scott Zimmerman - Published on Amazon.com
Format:Paperback|Amazon Verified Purchase
I just finished reading this book--twice! The second half requires careful study to get the most out of it. This is really an OUTSTANDING piece of work. The writing is clear and all the code examples are precisely to the point. Virtually zero fluff in this entire book. You can only imagine how much work he put into designing and debugging the programs so that they are so clean. Well, I didn't notice any bugs in the code, but I didn't try to run them yet and his narrative shows that his attention to detail goes way beyond a quick code review.
Here are the things I liked most about this book: 1) it thoroughly uses C++11 features, including std::move, etc. 2) it's comphrehensive coverage of threading; and 3) it includes code and design discussion for a complete thread pool.
In my opinion there are only a few shortcomings: 1) The discussions of packaged_task, promise, spinlock, and fences/barries wasn't elaborate enough to help me really learn when/where to use these tools. Futures and async were covered thoroughly, but not these other topics. There was comment about spinlock unblocking the current thread that I didn't understand.
2) There are many places where the author/editor could have tied more narrative to the bullets in the code. That's a nifty feature of this book series, and it worked very well in this book, except that in some places it should have been done more. A couple of tricky lines of code had no comment, e.g. how the handle() function works in the message passing example. The chaining syntax is unusual and needs more explanation.
3) spinlock, and a few other topics, are not in the index.
4) It would be very helpful to see a brief example program that would report the relative performance of an analogous data structure class from the lock-based chapter vs. the lock-free chapter. This would give the reader a glimpse as to when the added complexity pays off.
I will keep this book for a long time :-)
3 of 4 people found the following review helpful
Concurrency in C++11 standard 26 April 2012
By Bas Vodde - Published on Amazon.com
Format:Paperback
I was a reviewer for an early draft of this book. At that time, the new C++ standard was still called C++0x because... of course it would be published before 2010. It didn't. The author patiently waited finishing this book until the C++ standard was finished so that it is inline with the new C++11 standard.

The book described the new C++ threading standard library and how to use it. It assumes a fairly good understanding of C++ already, it isn't the first C++ book you want to pick up :P. I felt it was pretty well written and easy to understand, though I wasn't always comfortable with the authors programming style.

The book consists of ten chapters. The first five are chapters that introduce the basic concurrency classes in the new C++ standard: Threads, mutex, promises and more. Chapter 6-8 are about designing Concurrent C++ applications and I felt it was good that the book went further than just explaining the new library constructs. The last 2 chapters are a bit more advanced topics about thread management and testing.

As said, I enjoyed the book. It was well written and I wasn't familiar with everything from the latest C++ standard yet (Appendix gives an introduction to all the changes in the C++11 standard. I'd definitively recommend this book for anyone who want to write multi-threaded applications in C++. I know of no book that does a better job at this moment. 4 out of 5 stars as the book does an exceptionally good job at what it should do, yet it wasn't a WOW-insight book.
Search Customer Reviews
Only search this product's reviews

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Listmania!


Look for similar items by category


Look for similar items by subject


Feedback


Amazon.co.uk Privacy Statement Amazon.co.uk Delivery Information Amazon.co.uk Returns & Exchanges