4 ms·
It reminded me an old presentation - "Why Threads Are A Bad Idea (for most purposes)", a little bit old, but still contains a lot of truth. http://www.cs.ubc.c
by tszming 16y ago
It reminded me an old presentation - "Why Threads Are A Bad Idea
(for most purposes)", a little bit old, but still contains a lot of truth.
http://www.cs.ubc.ca/~norm/508/2009W1/ouster95threadsbad.pdf http://www.cs.ubc.ca/~norm/508/2009W1/ouster95threadsbad.pdf [slide5]
What's Wrong With Threads?
- Too hard for most programmers to use.
- Even for experts, development is painful.
- 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).