Description
Currently, a future created using Future.immediate() will complete synchronously. That means code consuming futures has to be aware that operations that it chains of a future it receives may in fact run synchronously or they may do bad things.
For a concrete example, the unittest API will fail spectacularly if what it thinks is an async test completes synchronously.
To keep the semantics simple for consumers of futures, I believe they should always complete asynchronously. This means Future.immediate() should pump the message queue before completing.
If we do make this change, we should probably change the name of the constructor too, since it's no longer "immediate". I would either just use an unnamed constructor, or possibly "of": new Future.of(someValue);