Commit f016ebc
Fix co_nothrow in now_task, add getErrorHandle support to TaskWrapper
Summary:
Previously, `TaskWrapper` didn't support the `ExtendedCoroutineHandle` protocol called `getErrorHandle`, so `co_nothrow` had no effect in those coros. That is, `co_await co_nothrow()` would still throw.
This adds a test for the broken behavior, fixes `TaskWrapper` to implement the protocol, which causes the test to pass.
The new `if constexpr` branches in `await_transform` are covered by existing `NoexceptTest.cpp` coverage of `co_nothrow(noexceptAwaitable())`.
Reviewed By: ispeters
Differential Revision: D82927064
fbshipit-source-id: f5eb73d6cc97bcaadf2b1811f5d5d59d9af68ff61 parent fa28acf commit f016ebc
File tree
2 files changed
+22
-0
lines changed- third-party/folly/src/folly/coro
- safe/test
2 files changed
+22
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
224 | 234 | | |
225 | 235 | | |
226 | 236 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
211 | 223 | | |
212 | 224 | | |
213 | 225 | | |
| |||
0 commit comments