Skip to content

Commit 2ea29f2

Browse files
madmongo1louistatta
authored andcommitted
Correct misleading error in May/June update
1 parent bd53ab7 commit 2ea29f2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: _posts/2020-06-31-RichardsJuneUpdate.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,11 @@ of execution context it is associated with. However, you do know that *if* the u
7272
out of work, then we want to prevent it from doing so for the duration of some operation.
7373

7474
In this case, we can't use `require` because this will fail to compile if the given executor does not support the
75-
`outstanding_work::tracked` property. Therefore we would request the capability rather than require it:
75+
`outstanding_work::tracked` property. Therefore we would request (or more correctly, _prefer_) the capability rather
76+
than require it:
7677

7778
```c++
78-
auto maybe_tracked = asio::request(e, asio::execution::outstanding_work.tracked);
79+
auto maybe_tracked = asio::prefer(e, asio::execution::outstanding_work.tracked);
7980
```
8081

8182
We can now use `maybe_tracked` as the executor for our operation, and it will "do the right thing" regarding the tracking

0 commit comments

Comments
 (0)