Theoretical problems are always interesting, if not practical.
In a multithreaded system, you can easily imagine situations where you have
split up processing on multiple threads, yet the answer requires all of the
threads to come together.
This is especially true if there is an external resource that you need to
access.
For example: you need to get data from a web site, and data from an excel
spreadsheet, and data from a sql server database, pull them all together,
perform some calculations, and present the results in a User interface.
Sure, you could create one background thread to do things in a serial
fashion, but why not create three threads: one to attach to SQL, one to open
the spreadsheet, and one to access the web site. Each of these can have
aspects that could delay processing. The network could be down or slow...
SQL could be offline... the spreadsheet data may require you to load Excel
into memory, which simply takes up resources.
I promise one thing: they won't all finish at the same time. However, your
calculations, still a background operation, requires all three datasets. So
you join threads and do not proceed until all three have delivered data.
Then you complete the calculation, set the data where the U/I can find it,
and trigger the U/I.
HTH
--- Nick