开发者

Sample Concurrency projects in Java

I finished reading the first seven chapters of Java Concurrency in Practice. Can you give me any 开发者_如何转开发ideas of sample projects so that my ideas will become solidified ?


How about implementing your own 'thread safe' list and then making multiple threads add, get, and remove elements from it? Liberal use of System.out would show you just how interesting it can get when multiple threads work on the same data structure.


This guy has a great set of tutorials on concurrency. jenkov tutorials

One interesting exercise try to create a "fair" lock using nothing but the simplest java language constructs. It allows you to become intimately familiar with all the paranoia inducing aspects of threads(race conditions, missed signals, etc.) and helps us come to terms with why the prospect of writing multi-threaded applications keep me up at night.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜