Open
Description
This would enable us to write:
def start(p: Promise[Unit]) = {
doSomethingAsyncReturningAFuture() map { result =>
p.success()
} recover { ex =>
logger.error("problem at start up!", ex)
p.failure()
}
}
a) We wouldn't need the Future class at all.
b) It would be more towards the Scala-way
c) Users cannot overwrite the Futures failure handler during startup. This is safer than the Java API approach (hoping the dev doesn't do stupid things ;)).