diff options
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. * |