views:

159

answers:

2

What would you suggest as a road map for becoming very proficient in writing multithreaded applications - beyond "tinkering"?

I am a C# developer - would branching off into some other languages help this endeavor?

Does the parallel addition to .NET 4.0 hide things that you should know in order to make it easier?

+6  A: 
  • Read Joe Duffy's "Concurrent Programming on Windows". Joe is an amazing expert.
  • Investigate different approaches to concurrency on different platforms; look at Erlang, Scala etc
  • Likewise read Java concurrency books, which will have some subtly different details, but often tackle the same core issues and have some useful patterns. "Java Concurrency in Practice" is often recommended.
  • Look at the various options on .NET, including the Coordination and Concurrency Runtime and F# asynchronous computations
  • Definitely learn Parallel Extensions - it'll help a lot, and from what I've seen, a lot of very careful design work has gone into it. (It's changing somewhat for 4.0b2 though, so you may want to defer this for now.)
Jon Skeet
+2  A: 

Theres a really good PDF about threading in .NET here the MSDN documentation for the Thread class as well as the threading primitives (Mutex, WaitHandle, ReaderWriterLockSlim et al) is also good reading.

The key things to understand are:

  1. When to use a thread
  2. When not to use threads
  3. How to manage sharing state between threads.

I could go on to explain these here, but I feel the threading PDF linked to above does a far better job than I could in that respect, the key point is that threads are a powerful tool and understanding when and how to use them will make you more proficient in their use than simply reading MSDN, although strategies for using threads effectively are covered there also.

Crippledsmurf
The link is missing a "w". Use this: http://www.albahari.com/threading/
Yoav
Fixed the link, Thanks for catching that Yoav
Crippledsmurf