I saw a stackoverflow member suggest using Thread.join() to have a "main" thread wait for 2 "task" threads to complete.
I will frequently do something different (shown below) and I want to know if there are any problems with my approach.
final CountDownLatch latch = new CountDownLatch(myItems.length);
for (Item item : myItems) {
//doStuff launches a Thread that calls latch.countDown() as it's final act
item.doStuff(latch);
}
latch.await(); //ignoring Exceptions for readability