summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2021-09-16 06:21:04 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-09-16 07:03:03 +0000
commit0ed651b8a8fccd5e7f550d316ee3ee0860b942ae (patch)
treee1b37f74282813c4e3f704b9c8dd6fad8d87f8b6 /docs
parent0bc8d6bd356392745764362465cfcbe836b9854a (diff)
downloadmongo-0ed651b8a8fccd5e7f550d316ee3ee0860b942ae.tar.gz
SERVER-59862 PromiseAndFuture comment revision
Diffstat (limited to 'docs')
-rw-r--r--docs/futures_and_promises.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/futures_and_promises.md b/docs/futures_and_promises.md
index 5600399090c..550f05dff54 100644
--- a/docs/futures_and_promises.md
+++ b/docs/futures_and_promises.md
@@ -103,7 +103,7 @@ may crash debug builds of the server in the future).
To create a `Promise` that has a Future, you may use the [`PromiseAndFuture<T>`][pf]
utility type. Upon construction, it contains a created `Promise<T>` and its
corresponding `Future<T>`. The perhaps-familiar `makePromiseFuture<T>` factory
-function now simply returns a value-initialized `PromiseAndFuture<T>{}`.
+function now simply returns `PromiseAndFuture<T>{}`.
As was previously alluded to, it's
also possible to make a "ready future" - one that has no associated promise and is already filled
@@ -150,7 +150,7 @@ using the member function `Future<T>::semi()`. Let's look at a quick example to
```c++
// Code producing a `SemiFuture`
SemiFuture<Work> SomeAsyncService::requestWork() {
- PromiseFuture<Work> pf;
+ PromiseAndFuture<Work> pf;
_privateExecutor->schedule([promise = std::move(pf.promise)](Status s) {
if (s.isOK()) {
auto w = produceWork();