3 comments

4

To me it seems really strange that people are having these serious issues.

Most of the issues I always hear about stem from

  • Nested mutual_exclusion_object_of_choice (MEOC) (dealock)
  • Shared data with no MEOC. (races)
  • No single simple point of entry (complicated)

That is just my opinion though. Maybe others have seen different issues?

1

That's mostly what I've seen as well. Perhaps this is a suitable warning to novices, since "there be dragons" if you blithely wander into those waters. I received a similar warning when I was starting out. The effect of that was not to put me off threaded programming, but instead to try and piece something together without the help of my coworkers, since they'd all avoided doing any threaded code. I ended up writing a pretty awful system.

But now, if you're willing to do even a little bit of learning we have WAY better tools than we ever did for solving those problems. Channels / CSP systems, immutable data structures, java reducers or LinkedBlockingQueue, actors, maybe mapReduce, the list goes on.

2

Yeah I think maybe it is the learning part that might be the issue. A very large majority of schools don't require students to really learn any parallel/concurrent programming. The most I ever saw was in the OS class but the examples are most theoretical or trivial. Oh yeah, I encounter the sleeping barbers problem all the time (in the general sense) /s.