We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b02fe3a commit 7990d91Copy full SHA for 7990d91
src/core/promise.cxx
@@ -191,9 +191,13 @@ struct awaitable : std::suspend_always {
191
192
// TODO: Add tests for exception/cancellation handling in fork/call.
193
194
- if (!self.child || parent.promise().frame.is_cancelled()) [[unlikely]] {
195
- // Noop if an exception was thrown or canceled.
196
- // Must clean-up the child that will never be resumed.
+ if (!self.child) [[unlikely]] {
+ // Noop if an exception was thrown.
+ return parent;
197
+ }
198
+
199
+ if (parent.promise().frame.is_cancelled()) [[unlikely]] {
200
+ // Noop if canceled, must clean-up the child that will never be resumed.
201
return self.child->handle().destroy(), parent;
202
}
203
0 commit comments