Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.util.concurrent , examples, tutorial and code [closed]

I've been ask to build a multi-threaded java application using the java.util.concurrent library. I'm not familiar with this library, but have a good understanding of problems with multi-threaded code.

I'm looking for a tutorial and example code that shows this java library in use and it's best practises.

like image 433
The Unix Janitor Avatar asked Nov 17 '10 19:11

The Unix Janitor


3 Answers

If you are a fast learner, I recommend the site www.java2s.com (Java API by Example).

Here's the full link for the concurrent package: http://www.java2s.com/Code/JavaAPI/java.util.concurrent/Catalogjava.util.concurrent.htm

EDIT: If you can spend some cash (and isn't in a hurry), I recommend this book: Java Concurrency in Practice http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601/ref=sr_1_1?ie=UTF8&qid=1290021702&sr=8-1

It is really full of examples and good practices.

like image 70
Carlos Melo Avatar answered Nov 15 '22 13:11

Carlos Melo


I usually prefer to learn from the primary source and recommend this one: http://download.oracle.com/javase/tutorial/essential/concurrency/index.html

Also I like very much book "Thinking in Java" by Bruce Eckel

like image 30
AlexR Avatar answered Nov 15 '22 12:11

AlexR


You can try my brief notes on the subject (it's only 10 pages). I've made this quick tutorial after reading some articles alongside with javadoc for java.util.concurrent.

like image 22
Anton Shchastnyi Avatar answered Nov 15 '22 13:11

Anton Shchastnyi