diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/concurrent/Promise.scala | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/library/scala/concurrent/Promise.scala b/src/library/scala/concurrent/Promise.scala index 8355a73a1f..02253d4bd9 100644 --- a/src/library/scala/concurrent/Promise.scala +++ b/src/library/scala/concurrent/Promise.scala @@ -66,11 +66,8 @@ trait Promise[T] { * * @return This promise */ - final def completeWith(other: Future[T]): this.type = { - other onComplete { this complete _ } - 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. * * @return This promise |