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.
2 parents 3c585d5 + 0ceab44 commit d9d0397Copy full SHA for d9d0397
stdlib/public/Concurrency/Task.cpp
@@ -832,7 +832,7 @@ static AsyncTaskAndContext swift_task_create_commonImpl(
832
// the async context to get at the parameters.
833
// See e.g. FutureAsyncContextPrefix.
834
835
- if (!futureResultType) {
+ if (!futureResultType || taskCreateFlags.isDiscardingTask()) {
836
auto asyncContextPrefix = reinterpret_cast<AsyncContextPrefix *>(
837
reinterpret_cast<char *>(allocation) + headerSize -
838
sizeof(AsyncContextPrefix));
0 commit comments