posted 23 years ago
In practical terms:- say you need to do two time-consuming, I/O bound jobs A and B. Say they are implemented in two Runnable classes A and B. You need both to be finished in order to carry on.
Because they are I/O bound, it makes a lot of sense to run A and B in parallel using threads:The b.join() statement ensures that the doWork method will only return once both job A and job B have been finished.
- Peter
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd