A rule that's always stood me in good stead is locks and mutexes should be used for protecting the consistency of some shared state rather than for making sure only one thread runs a bit of code at a time.
Is there a similar truth about threads? Feels like it would be something like "threads are a way of doing work, not a software architecture".
Is there a similar truth about threads? Feels like it would be something like "threads are a way of doing work, not a software architecture".