Commit 64e744ee authored by Terence Feng's avatar Terence Feng Committed by Facebook Github Bot

Minor fixes in Futures.md (#911)

Summary:
lvalue-qualified then() has been deprecated
lvalue-qualified get() has been deleted
Pull Request resolved: https://github.com/facebook/folly/pull/911

Reviewed By: LeeHowes

Differential Revision: D9310836

Pulled By: yfeldblum

fbshipit-source-id: 662596bf5985f7ceabb2a23725d51f8e05407340
parent 561062e6
......@@ -26,14 +26,14 @@ void foo(int x) {
cout << "making Promise" << endl;
Promise<int> p;
Future<int> f = p.getSemiFuture().via(&executor);
auto f2 = f.then(foo);
auto f2 = move(f).then(foo);
cout << "Future chain made" << endl;
// ... now perhaps in another event callback
cout << "fulfilling Promise" << endl;
p.setValue(42);
f2.get();
move(f2).get();
cout << "Promise fulfilled" << endl;
```
......
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