Commit 59b63337 authored by Nikhil Gupta's avatar Nikhil Gupta Committed by Facebook Github Bot

Minor fixes in Futures.md

Summary: As title

Reviewed By: yfeldblum

Differential Revision: D8517773

fbshipit-source-id: 971178184e446c9de476cf43f65e04f49f05e0ad
parent ffc20fc4
...@@ -154,7 +154,7 @@ Once an executor is attached, a `Future` allows continuations to be attached and ...@@ -154,7 +154,7 @@ Once an executor is attached, a `Future` allows continuations to be attached and
``` ```
SemiFuture<GetReply> semiFut = mc.future_get("foo"); SemiFuture<GetReply> semiFut = mc.future_get("foo");
Future<GetReply> fut2 = semiFut.via(&executor); Future<GetReply> fut1 = semiFut.via(&executor);
Future<string> fut2 = fut1.then( Future<string> fut2 = fut1.then(
[](GetReply reply) { [](GetReply reply) {
...@@ -203,7 +203,7 @@ aFuture ...@@ -203,7 +203,7 @@ aFuture
.via(e2).then(z); .via(e2).then(z);
``` ```
`x` will execute in the context of the executor associated with `aFuture`. `y1` and `y2` will execute in the execution context of`e1`, and `z` will execute in the of `e2`. If after `z` you want to get back to the original context, you need to get there with a call to `via` passing the original executor. Another way to express this is using an overload of `then` that takes an Executor: `x` will execute in the context of the executor associated with `aFuture`. `y1` and `y2` will execute in the context of `e1`, and `z` will execute in the context of `e2`. If after `z` you want to get back to the original context, you need to get there with a call to `via` passing the original executor. Another way to express this is using an overload of `then` that takes an Executor:
``` ```
aFuture aFuture
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment