Wouldn't it be cool if everybody did it? Login and vote now.
By adobni
via java.dzone.com
Published: Feb 07 2008 / 11:49
Java 5 introduced many new concurrency primitives and collections, and this post is going to look at two classes that can be used to coordinate threads: CountDownLatch and CyclicBarrier. A CountDownLatch is initialized with a counter. Threads can then either count down on the latch or wait for it to reach 0. When the latch reaches 0, all waiting threads are released.
Add your comment
Voters For This Link (21)
puredanger
rick
ronslow
madarco
kirillcool
stephan.koelle
alruiz15
yardena
vinhsu
hhuynh
mezmo
mzambrini
adobni
rsmaniak
picpromusic
asgeirn
pashimito
aglover
sharrissf
keyofdminor
kieronwilkinson