Categories
Uncategorized

8 Simple Rules for Designing Threaded Applications

The devx article 8 Simple Rules for Designing Threaded Applications has some good advice:

  1. Be sure you identify truly independent computations.
  2. Implement concurrency at highest level possible.
  3. Plan early for scalability to take advantage of increasing numbers of cores.
  4. Make use of thread-safe libraries wherever possible.
  5. Use the right threading model.
  6. Never assume a particular order of execution.
  7. Use thread-local storage whenever possible; associate locks to specific data, if needed.
  8. Don’t be afraid to change the algorithm for a better chance of concurrency.