Commit b532ad3
Use
Summary:
`yourTask().scheduleOn(ex)` is deprecated in favor of `co_withExecutor(ex, yourTask())`
For `Task`, both forms are equivalent, but `co_withExecutor` makes it much easier to migrate to the [lifetime-safe `NowTask`](https://fb.prod.workplace.com/groups/192968587972839/posts/1784449738824708) (and upcoming `SafeTask`).
Thanks to [C++ ADL](https://en.cppreference.com/w/cpp/language/adl.html), you can write simply `co_withExecutor`; it does not *have* to be qualified with the namespace `folly::coro::`.
[This post](https://fb.prod.workplace.com/groups/192968587972839/posts/1693720697897613) explains the safety benefits of `co_withExecutor`. Moreover, the new name better aligns with the other `folly::coro` protocol of `co_withCancellation()`.
This diff generated with:
```
fbpython fbcode/scripts/rbarnes/schedule_on_fixer.py
```
- If you approve of this diff, please use the "Accept & Ship" button :-)
Reviewed By: meyering
Differential Revision: D77751576
fbshipit-source-id: 71a6a7e4f78494decb93b5bf8afa1382f94d71e9co_withExecutor in feed_ranking_infra/serving_eval/RankLlmIValueDataEnricher.cpp +51 parent 979605d commit b532ad3
File tree
4 files changed
+14
-12
lines changed- third-party/folly/src/folly/coro
4 files changed
+14
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
373 | 375 | | |
374 | 376 | | |
375 | 377 | | |
376 | | - | |
| 378 | + | |
377 | 379 | | |
378 | 380 | | |
379 | 381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
273 | | - | |
| 272 | + | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
| 351 | + | |
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| |||
0 commit comments