logoalt Hacker News

jltsirenyesterday at 8:24 PM0 repliesview on HN

A mutex is a natural abstraction when there is exactly one of them. You have a bunch of tasks doing their own stuff, with shared mutable state behind the mutex. When you start thinking about using two mutexes, other abstractions often become more convenient.