RichFuture
Useful enhancements to Future.
Value members
Concrete methods
Cause this Future to fail with a FutureTimeoutException, with the given message, if it hasn't otherwise resolved in the given time. Note that it is an error if the Future resolves after this time -- that will cause a double-resolution. So this is mainly intended as a backstop to prevent hangs.
Cause this Future to fail with a FutureTimeoutException, with the given message, if it hasn't otherwise resolved in the given time. Note that it is an error if the Future resolves after this time -- that will cause a double-resolution. So this is mainly intended as a backstop to prevent hangs.
Guarantees that this Future will not complete synchronously. If it is already completed, this returns a new Future that will return the same value after a minimal delay.
Guarantees that this Future will not complete synchronously. If it is already completed, this returns a new Future that will return the same value after a minimal delay.
This is mainly useful for simplifying code paths so that you don't have to deal with Futures that return synchronously only during, eg, testing.
Simpler version of failAfter(), which will fail after 1 second.
Simpler version of failAfter(), which will fail after 1 second.