2 ms·
"Threads are hard, let's go shopping." If you're that afraid of concurrency, just use a single Big Damn Lock to only ever let one touch any shared state at a t
by tbrownaw 16y ago
"Threads are hard, let's go shopping."
If you're that afraid of concurrency, just use a single Big Damn Lock to only ever let one touch any shared state at a time. You'll lose out on most of the benefits, but you won't deadlock and won't corrupt things (or at least, not any worse than you can with interdependent or chained events).
Or grab a compiler and a decent beginning textbook (or the internet) and put in your hundred hours or so, to know how to use concurrency sanely (add probably another hundred if you're planning to build you own lock-free underlying data structures).