Go look at the workspace member
/fun-with-futures
.
5 - Understanding Asynchronous Operations with Futures
Warning: The book uses the term reactor, which is now referred to as an executor in the modern futures crates.
Pattern Reactor + Promises: A reactor allows a developer to run multiple activities in the same thread, while a promise represents a delayed result that will be available later. A reactors keeps a set of promises and continues to poll until it is completed and the result is returned.
The Basic Types of future
s
Future
Stream
Sink