Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    Cover of C Concurrency in Action

    C Concurrency in Action

    Anthony Williams · 2012

    With the new C++ Standard and Technical Report 2 (TR2), multi-threading is coming to C++ in a big way. TR2 will provide higher-level synchronization facilities that allow for a much greater level of abstraction, and make programming multi-threaded applications simpler and safer. Concurrent programming is required if programmers are to take advantage of the multi-core microprocessors increasingly available from Intel and others. The new standard for C++ has extensions to the language that make concurrent programming more accessible to regular developers. As a guide and reference to the new concurrency features in the upcoming C++ Standard and TR2, this book is invaluable for existing programmers familiar with writing multi-threaded code in C++ using platform-specific APIs, or in other languages, as well as C++ programmers who have never written multithreaded code before.

    Programming
    Open LibraryAmazon
    Stats for nerds
    14recommend
    24mentions
    22people
    2012–2025years
    63% recommend38% neutral

    Mentions per year

    20122014201620182020202220242025

    What Hacker News says

    1. JtsummersAug 2025
      The Art of Multiprocessor Programming. It does talk about reentrant locks and other things this review says it doesn't. The more interesting parts of it though are the back half, after going through lock implementations and such it actually starts solving problems using both lock-based and lock-free designs.

      Follow it up with something appropriate to the language you're using, like C++ Concurrency in Action for C++ (much of it transfers to other languages).

      thread
    2. senderistaAug 2025
      Maybe you'd like Anthony Williams's _C++ Concurrency in Action_, which doesn't cover futexes (or how to write your own synchronization primitives in general), but does cover real-world details like memory orderings and SMR for lock-free data structures. If that's still too high-level, then maybe check out Paul McKenney's excellent free monograph "Is Parallel Programming Hard, And, If So, What Can You Do About It?" for a more hardware-focused perspective (which doesn't cover futexes in detail either but does direct you to the canonical reference for implementing futex-based primitives, namely Ulrich Drepper's "Futexes Are Tricky").

      I think TAOMPP is fine for what it is (teaching high-level concurrency concepts) and discussing OS-level implementation details would be out of place. The important thing it teaches is how to think about concurrency, not how to write your own synchronization primitives. E.g., the Peterson or bakery locks are useless in the real world (as the book admits), but understanding their proofs of correctness will help you reason about the concurrent algorithms you have to write yourself.

      thread
    3. npalliAug 2024
      "C++ Concurrency in Action" by Anthony Williams is solid.

      Make sure you get the second edition, it is updated for C++17.

      https://www.amazon.com/C-Concurrency-Action-Anthony-Williams...

      thread
    4. rramadassNov 2023
      Sure. IMO it is important to have an overall picture of the fields of Concurrent/Parallel/Distributed architecture/programming before delving into the details of a language/library implementation. To that end i have found the following books useful;

      1) Foundations of Multithreaded, Parallel, and Distributed Programming by Gregory R. Andrews - This is one of my favourites even though old. You get to learn/compare the different paradigms in one single book.

      2) Parallel Programming: Concepts and Practice by Bertil Schmidt et al. - This is a more recent book with good explanations/coverage including CUDA.

      3) The Art of Multiprocessor Programming by Maurice Herlihy et al. - Well known classic though with a main focus on shared-memory architectures.

      Along with the above you also need more detailed language/library specific implementation books;

      a) C++ Concurrency in Action by Anthony Williams.

      b) Programming with POSIX Threads by David Butenhof.

      c) UNIX Systems Programming: Communication, Concurrency and Threads by Kay Robbins and Steve Robbins.

      Finally; for studying concurrency at the OS level where software meets hardware, i have found nothing better than;

      i) Unix Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers by Curt Schimmel.

      thread
    5. RcouF1uZ4gsCJun 2022
      Looking at the code, it seems like it is more of a class project rather than a highly optimized library.

      It is using mutexes, condition variables, and futures to write a pretty much textbook implementation of a thread pool.

      However, there will be significant contention, as all the workers are reading from the same queue, and the submissions are going to the same queue.

      There are not multiple queues with work-stealing which is I think a minimum for a production level version of something like this.

      EDIT:

      IIRC C++ Concurrency in Action by Anthony Williams has a nice discussion of the issues of building a C++ thread pool using the C++ standard library. It does address things like contention and work-stealing.

      thread
    6. brtvJun 2021
      I quite liked the book "C++ Concurrency in Action: Practical Multithreading". It has been a few years since I've read it, but it gave me a better understanding of both C++ and concurrency in general.
      thread

    Related

    Cover of Modern X86 Assembly Language Programming
    2016–2020

    Modern X86 Assembly Language Programming

    Daniel Kusswurm
    2 recommend · 4
    Cover of Programming with POSIX threads
    2010–2023

    Programming with POSIX threads

    David R. Butenhof
    4 recommend · 5
    Cover of Compiler construction for digital computers
    2015–2026

    Compiler construction for digital computers

    David Gries
    1 recommend · 7
    Cover of Embedded C
    2010–2024

    Embedded C

    Michael J. Pont
    1 recommend · 3
    Cover of Hands-On Network Programming with C
    2022–2024

    Hands-On Network Programming with C

    Lewis Van Winkle
    2 recommend · 2
    Cover of C interfaces and implementations
    2008–2026

    C interfaces and implementations

    David R. Hanson
    46 recommend · 114
    Cover of Java Concurrency in Practice
    2009–2026

    Java Concurrency in Practice

    Brian Goetz
    53 recommend · 82
    Cover of C++ Primer
    2008–2026

    C++ Primer

    Stanley B. Lippman
    53 recommend · 74