by api · 16y ago · 0 comments
If you have a lot of critical sections all over the place, you're probably doing it wrong.
The only exception is when you're forced to implement network code using a thread-per-connection or thread-per-socket model, in which case you might end up having to have your client/server threads work within your app's regular workflow. Icky, and should be avoided when possible.
I did say "I feel" because I could be wrong, but there are still a lot of people who think that the operating idea of a thread is still the only possible meaning of the term (I meet them every time Node.js comes up and the Node.js partisans argue passionately against operating system threads), but those days are long gone. So even if you do understand this, there are others who don't.