2

Background

In The Art of Unix Programming, Eric S. Raymond dismisses multithreaded programming as a performance hack that should be avoided. According to him, the biggest problem with threads is that they share memory by default instead of forcing the programmer to come up with a sensible communication protocol between the different parts of the system.

However, that book was finished in 2003, before multicore processors had taken over the consumer market, which from my point of view is a game-changer.

Questions

  1. Is using threads still considered an anti-pattern?
  2. Are there examples of Unix programs extensively using threads with success?

closed as primarily opinion-based by Bananguin, DopeGhoti, Scott, chaos, Archemar Dec 17 '15 at 18:46

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Raymond's 2011 update on the subject: esr.ibiblio.org/?p=4017 – Mark Plotnick Dec 17 '15 at 18:10
  • That is an example of a poor choice of the passive voice. Better phrasing: Does Eric S. Raymond still consider using threads to be an anti-pattern? – JdeBP Dec 17 '15 at 18:21
  • that is a weird word. it suggests a set of regular occurrences that cancels the form of their regular occurrence. – mikeserv Dec 17 '15 at 18:55
  • Multithreading doesn't help you utilize multicore any better than multiprocessing does. Multiprocessing may be even better, because sharing processes don't share memory by default so there's no need to update caches among cores. – PSkocik Dec 17 '15 at 19:14