Fixed minor typos in the futures docs.

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
This commit is contained in:
Jonas Bonér 2012-02-03 16:31:31 +01:00
parent 370e2d9818
commit a221722c41
2 changed files with 16 additions and 13 deletions

View file

@ -18,7 +18,7 @@ Execution Contexts
------------------
In order to execute callbacks and operations, Futures need something called an ``ExecutionContext``,
which is very similar to a `java.util.concurrent.Executor``. if you have an ``ActorSystem`` in scope,
which is very similar to a ``java.util.concurrent.Executor``. if you have an ``ActorSystem`` in scope,
it will use its default dispatcher as the ``ExecutionContext``, or you can use the factory methods provided
by the ``ExecutionContexts`` class to wrap ``Executors`` and ``ExecutorServices``, or even create your own.
@ -199,7 +199,7 @@ which allows for ordering like in the following sample:
Auxiliary methods
-----------------
``Future`` ``fallbackTo`` combines 2 Futures into a new ``Future``, and will hold the successful value of the second ``Future`
``Future`` ``fallbackTo`` combines 2 Futures into a new ``Future``, and will hold the successful value of the second ``Future``
if the first ``Future`` fails.
.. includecode:: code/akka/docs/future/FutureDocTestBase.java
@ -230,7 +230,7 @@ our ``Future`` would have a result of 0. The ``recover`` method works very simil
so multiple ``Exception``\s can be handled in this manner, and if an ``Exception`` is not handled this way
it will behave as if we hadn't used the ``recover`` method.
You can also use the ``recoverWith`` method, which has the same relationship to ``recover`` as ``flatMap` has to ``map``,
You can also use the ``recoverWith`` method, which has the same relationship to ``recover`` as ``flatMap`` has to ``map``,
and is use like this:
.. includecode:: code/akka/docs/future/FutureDocTestBase.java