diff options
author | Aleksandar Prokopec <axel22@gmail.com> | 2012-04-27 19:00:59 +0200 |
---|---|---|
committer | Aleksandar Prokopec <axel22@gmail.com> | 2012-04-27 19:00:59 +0200 |
commit | 9c4baa93d906b161f501ae04f1552e1b7d448436 (patch) | |
tree | 4b11bf4193a08598c7d6d13a5803ac1bc385dedf /src | |
parent | 8fc543b5dd7e6a8fa1827cc9e9d65e721cae140e (diff) | |
download | scala-9c4baa93d906b161f501ae04f1552e1b7d448436.tar.gz scala-9c4baa93d906b161f501ae04f1552e1b7d448436.tar.bz2 scala-9c4baa93d906b161f501ae04f1552e1b7d448436.zip |
Porting akka future tests.
Fixed a bug in Future.zip.
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/concurrent/Future.scala | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/library/scala/concurrent/Future.scala b/src/library/scala/concurrent/Future.scala index def086bc03..55c91619fa 100644 --- a/src/library/scala/concurrent/Future.scala +++ b/src/library/scala/concurrent/Future.scala @@ -384,18 +384,18 @@ trait Future[+T] extends Awaitable[T] { */ def zip[U](that: Future[U]): Future[(T, U)] = { val p = newPromise[(T, U)] - + this onComplete { case Left(t) => p failure t - case Right(r) => that onSuccess { - case r2 => p success ((r, r2)) - } - } - - that onFailure { - case f => p failure f + case Right(r) => + that onSuccess { + case r2 => p success ((r, r2)) + } + that onFailure { + case f => p failure f + } } - + p.future } |