You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala.concurrent.Future fallbackTo method is documented as returning the failure of the first future if both futures fail, but instead it returns the failure of the second future. Maybe it should be something like this?
deffallbackTo[U>:T](that: Future[U]):Future[U] = {
valp=Promise[U]()
onComplete {
case s @Success(_) => p complete s
case f => that.onComplete {
case s @Success(_) => p complete s
case _ => p complete f
}
}
p.future
}
The text was updated successfully, but these errors were encountered:
scala.concurrent.Future fallbackTo method is documented as returning the failure of the first future if both futures fail, but instead it returns the failure of the second future. Maybe it should be something like this?
The text was updated successfully, but these errors were encountered: