Skip to content

Commit c89cb49

Browse files
authored
[Concurrency] Properly set task create flags in TaskGroup.startTaskSynchronously (#80299)
rdar://147907609 When starting tasks synchronously on task groups, the task create flags for isSynchronousStart and isDiscardingTask were always set to `false`. With this change the former will always be `true` and the latter conditionally `true` for discarding task groups.
1 parent 8430749 commit c89cb49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/Concurrency/Task+startSynchronously.swift.gyb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ extension ${GROUP_TYPE} {
170170
inheritContext: false,
171171
enqueueJob: false, // don't enqueue, we'll run it manually
172172
addPendingGroupTaskUnconditionally: true,
173-
isDiscardingTask: false,
174-
isSynchronousStart: false
173+
isDiscardingTask: ${'true' if 'Discarding' in GROUP_TYPE else 'false'},
174+
isSynchronousStart: true
175175
)
176176

177177
// Create the task in this group.

0 commit comments

Comments
 (0)