Concurrent programming
Threads, locks, cores, conditions
March 24, 2018 — February 17, 2020
compsci
computers are awful
concurrency hell
Concurrent programming, with examples:
Mention concurrency and you’re bound to get two kinds of unsolicited advice: first that it’s a nightmarish problem which will melt your brain, and second that there’s a magical programming language or niche paradigm which will make all your problems disappear.
We won’t run to either extreme here. Instead we’ll cover the production workhorses for concurrent software — threading and locking — and learn about them through a series of interesting programs. By the end of this article you’ll know the terminology and patterns used by POSIX threads (pthreads).