摘要: Working with shared mutable state is a huge burden that requires us toendure added complexity and the accompanied greater chances of error.When refactoring code, look out for some common concurrency-relatedmistakes:• Don’t create threads from within constructors; instead, create them instatic factor 阅读全文
posted @ 2012-02-24 10:08 Colin_Ye 阅读(225) 评论(0) 推荐(0) 编辑
摘要: • Manage a pool of threads• Easily schedule tasks for concurrent execution• Exchange data between concurrently running threads in a thread-safemanner• Gain fine-grained synchronization• Benefit from better concurrent performance using concurrent datastructuresAlthough the newer API helps in a number 阅读全文
posted @ 2012-02-24 09:58 Colin_Ye 阅读(165) 评论(0) 推荐(0) 编辑