summaryrefslogtreecommitdiff
path: root/src/library/scala/concurrent/Promise.scala
diff options
context:
space:
mode:
authorAleksandar Prokopec <aleksandar.prokopec@gmail.com>2011-12-07 16:52:08 +0100
committerAleksandar Prokopec <aleksandar.prokopec@gmail.com>2011-12-07 16:52:08 +0100
commitcbad136be350087ebb29b9a36c1da893bbb18ec9 (patch)
treee0a949f2ac39bb5313b5b018c95bbfe28ffcc102 /src/library/scala/concurrent/Promise.scala
parentcb8e0de9538ec57a90fd71c47e20b7319c4904cc (diff)
downloadscala-cbad136be350087ebb29b9a36c1da893bbb18ec9.tar.gz
scala-cbad136be350087ebb29b9a36c1da893bbb18ec9.tar.bz2
scala-cbad136be350087ebb29b9a36c1da893bbb18ec9.zip
Minor changes with the docs.
Diffstat (limited to 'src/library/scala/concurrent/Promise.scala')
-rw-r--r--src/library/scala/concurrent/Promise.scala13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/library/scala/concurrent/Promise.scala b/src/library/scala/concurrent/Promise.scala
index 898344cb66..ff72dee4b9 100644
--- a/src/library/scala/concurrent/Promise.scala
+++ b/src/library/scala/concurrent/Promise.scala
@@ -17,12 +17,14 @@ import scala.util.Timeout
/** Promise is an object which can be completed with a value or failed
* with an exception.
*
- * A promise is assigned a timeout when created. After the timeout expires,
- * the promise will be failed with a TimeoutException.
- *
* @define promiseCompletion
* If the promise has already been fulfilled, failed or has timed out,
* calling this method will throw an IllegalStateException.
+ *
+ * @define allowedThrowables
+ * If the throwable used to fail this promise is an error, a control exception
+ * or an interrupted exception, it will be wrapped as a cause within an
+ * ExecutionException which will fail the promise.
*/
trait Promise[T] {
@@ -42,13 +44,12 @@ trait Promise[T] {
*
* @param t The throwable to complete the promise with.
*
+ * $allowedThrowables
+ *
* $promiseCompletion
*/
def fail(t: Throwable): Unit
- /** The timeout for this promise.
- */
- def timeout: Timeout
}