DOC: More documentation of Futures
"failed"- the failed projection of a Future
onSuccess / foreach
onFailure
filter
Promise.successful
Promise.failed
onSuccess / foreach
onFailure
filter
Promise.successful
Promise.failed
Leave a comment
on 2011-12-20 08:32 *
By scott.clasen
Just going through the M1 docs and noticed this on the scala actor doc, which should be updated to reflect the new Await.result I think?
"For this purpose, there is the method Future.as[T] which waits until either the future is completed or its timeout expires, whichever comes first. The result is then inspected and returned as Some[T] if it was normally completed and the answer’s runtime type matches the desired type; if the future contains an exception or the value cannot be cast to the desired type, it will throw the exception or a ClassCastException (if you want to get None in the latter case, use Future.asSilently[T]). In case of a timeout, None is returned"
"For this purpose, there is the method Future.as[T] which waits until either the future is completed or its timeout expires, whichever comes first. The result is then inspected and returned as Some[T] if it was normally completed and the answer’s runtime type matches the desired type; if the future contains an exception or the value cannot be cast to the desired type, it will throw the exception or a ClassCastException (if you want to get None in the latter case, use Future.asSilently[T]). In case of a timeout, None is returned"
on 2012-01-16 17:45 *
By viktorklang
Also, better docs for the Java API