diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-04-01 16:47:22 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-04-01 16:47:22 +0200 |
commit | dcd9a83916f9e0128ef6869def82d4f23bdea0e0 (patch) | |
tree | e58331aebe8ba06fd1c15faf36fdbb3f77b489b9 /src/library/scala/concurrent/Promise.scala | |
parent | ebf0976c363c67e6a46c66d70b39704f1ce5e74a (diff) | |
parent | fcc20fe4d3ac5caceb50965bc202b880e61f984c (diff) | |
download | scala-dcd9a83916f9e0128ef6869def82d4f23bdea0e0.tar.gz scala-dcd9a83916f9e0128ef6869def82d4f23bdea0e0.tar.bz2 scala-dcd9a83916f9e0128ef6869def82d4f23bdea0e0.zip |
Merge commit 'fcc20fe' into merge/2.11-to-2.12-apr-1
Diffstat (limited to 'src/library/scala/concurrent/Promise.scala')
-rw-r--r-- | src/library/scala/concurrent/Promise.scala | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/library/scala/concurrent/Promise.scala b/src/library/scala/concurrent/Promise.scala index dc4376eba4..894b134e83 100644 --- a/src/library/scala/concurrent/Promise.scala +++ b/src/library/scala/concurrent/Promise.scala @@ -60,12 +60,7 @@ trait Promise[T] { * * @return This promise */ - final def completeWith(other: Future[T]): this.type = { - if (other ne this.future) { // this completeWith this doesn't make much sense - other.onComplete(this complete _)(Future.InternalCallbackExecutor) - } - this - } + final def completeWith(other: Future[T]): this.type = tryCompleteWith(other) /** Attempts to complete this promise with the specified future, once that future is completed. * |