5 ms·
When did using a thread become some kind of inscrutable black magic?
by FounderBurr 6y ago
When did using a thread become some kind of inscrutable black magic?
- sfshaw 6y agoAs domeone coming straight out of college, I disagree with your premise that threading is not accessible anymore. However, one possibility is that a proliferation of new languages brought with them new threading models and runtimes that all behave slightly differently. This makes many of the models look foreign.
- trog 6y agoNothing demonstrates why threading can sometimes be black magic better than someone misinterpreting a one sentence, plain English post :) I read the GP's post as implying that it is not actually that hard. But maybe they did mean that it has changed over time and gotten much more difficult and they're legit asking when that happened?!# Imagine this level of simple misunderstanding but applied to reading someone else's threading code!
- jerf 6y agoThe proper question is, when did threads stop being some kind of inscrutable black magic? And the answer is, if you consider the whole of the programming space, that it's still a work in progress. There's a lot of good ideas in various places, but I'm not sure I've seen it unified into one coherent whole in any one language in such a way that it's simply a solved problem for virtually no effort. Every A-list or B-list language I know either has easy concurrency that can still get you deep in trouble (like Go), or "solves" the concurrency problem but at a fairly steep cost to the programmer (like Haskell). Arguably Pony is the closest I've seen, but that's not even B-list yet, that's an "up and comer".
- Cthulhu_ 6y agoIt's not, but it's needlessly complicated for what most people need to use threads for - async background tasks like fetching a resource or (as mentioned in the article) parsing RSS off the main thread. I've done threads in the past, but for a good while now I've not had to do much thinking about async code thanks to advancements.