We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eed96d2 commit fae3c96Copy full SHA for fae3c96
stdlib/public/Concurrency/AsyncLet.cpp
@@ -155,10 +155,15 @@ SWIFT_CC(swift)
155
static void swift_asyncLet_endImpl(AsyncLet *alet) {
156
auto task = alet->getTask();
157
158
+ // Cancel the task as we exit the scope
159
+ swift_task_cancel(task);
160
+
161
// Remove the child record from the parent task
162
auto record = asImpl(alet)->getTaskRecord();
163
swift_task_removeStatusRecord(record);
164
165
+ // TODO: we need to implicitly await either before the end or here somehow.
166
167
// and finally, release the task and free the async-let
168
swift_release(task);
169
}
0 commit comments