Asynchronous Task Dependency Management with Promises and Futures
I recently found myself in need of a simple solution to ordering asynchronous tasks based on simple dependencies: they can complete in any order, but must commit in a specific order. This article discusses the details of solving this problem using simple promises and futures.
douglasrumbaugh.com