Skip to content

Commit fbaebfd

Browse files
committed
[Concurrency] Escalating task groups, type fix, group record IS-NOT a child record
1 parent b33fae8 commit fbaebfd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

stdlib/public/Concurrency/TaskStatus.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,13 +564,18 @@ static void performEscalationAction(TaskStatusRecord *record,
564564
return;
565565

566566
// Child tasks need to be recursively escalated.
567-
case TaskStatusRecordKind::ChildTask:
568-
case TaskStatusRecordKind::TaskGroup: {
567+
case TaskStatusRecordKind::ChildTask: {
569568
auto childRecord = cast<ChildTaskStatusRecord>(record);
570569
for (AsyncTask *child: childRecord->children())
571570
swift_task_escalate(child, newPriority);
572571
return;
573572
}
573+
case TaskStatusRecordKind::TaskGroup: {
574+
auto childRecord = cast<TaskGroupTaskStatusRecord>(record);
575+
for (AsyncTask *child: childRecord->children())
576+
swift_task_escalate(child, newPriority);
577+
return;
578+
}
574579

575580
// Cancellation notifications can be ignore.
576581
case TaskStatusRecordKind::CancellationNotification:

0 commit comments

Comments
 (0)