diff options
author | Viktor Klang <viktor.klang@gmail.com> | 2013-05-10 01:45:00 +0200 |
---|---|---|
committer | Viktor Klang <viktor.klang@gmail.com> | 2013-05-16 16:03:42 +0200 |
commit | 44a46f8312e7a8352dcc492be4b8b565b6bd6486 (patch) | |
tree | b3e4cb7ab25cd40e0fc425b45d6d86912237288f /src/library/scala/concurrent/Promise.scala | |
parent | ea681ec7cca6606f9a48b6bc90a88f04d135b1e4 (diff) | |
download | scala-44a46f8312e7a8352dcc492be4b8b565b6bd6486.tar.gz scala-44a46f8312e7a8352dcc492be4b8b565b6bd6486.tar.bz2 scala-44a46f8312e7a8352dcc492be4b8b565b6bd6486.zip |
Deprecate parameter names in scala.concurrent
for the purpose of being consistent.
Also switches to Future.successful iso
Promise.successful(..).future for brevity
in implementation code.
Diffstat (limited to 'src/library/scala/concurrent/Promise.scala')
-rw-r--r-- | src/library/scala/concurrent/Promise.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library/scala/concurrent/Promise.scala b/src/library/scala/concurrent/Promise.scala index 8355a73a1f..f950b13b78 100644 --- a/src/library/scala/concurrent/Promise.scala +++ b/src/library/scala/concurrent/Promise.scala @@ -86,7 +86,7 @@ trait Promise[T] { * * $promiseCompletion */ - def success(v: T): this.type = complete(Success(v)) + def success(@deprecatedName('v) value: T): this.type = complete(Success(value)) /** Tries to complete the promise with a value. * @@ -104,7 +104,7 @@ trait Promise[T] { * * $promiseCompletion */ - def failure(t: Throwable): this.type = complete(Failure(t)) + def failure(@deprecatedName('t) cause: Throwable): this.type = complete(Failure(cause)) /** Tries to complete the promise with an exception. * @@ -112,7 +112,7 @@ trait Promise[T] { * * @return If the promise has already been completed returns `false`, or `true` otherwise. */ - def tryFailure(t: Throwable): Boolean = tryComplete(Failure(t)) + def tryFailure(@deprecatedName('t) cause: Throwable): Boolean = tryComplete(Failure(cause)) } |