Design Patterns for Concurrent Programming? [closed]
Which are the most relevant design patterns for concurrency-oriented programming languages?
The most common design pattern used in concurrent programming is probably producer/consumer. There are always lots of issues and difficulties with concurrent programming, especially when starting out, like understand exactly what locking does, understanding when you need locking, understanding how to avoid deadlocks, understanding the performance implications of concurrency, and such.
Do as much research and testing as possible when working with concurrent development and code reviews are even more important than normal.
The other thing to keep in mind is it's also much better to take advantage of work others have already done and proven to be successful--use classes and frameworks available in the framework you use and those available on the net.
精彩评论