Skip to content

Commit 3dec40c

Browse files
authored
Merge pull request swiftlang#35874 from ktoso/wip-no-escape-group
[Concurrency] Reimplement Task.Group with accordance to Pitch #3
2 parents 4c60b96 + 163cb9e commit 3dec40c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1994
-1020
lines changed

include/swift/ABI/MetadataValues.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,9 +1936,9 @@ class JobFlags : public FlagSet<size_t> {
19361936

19371937
// Kind-specific flags.
19381938

1939-
Task_IsChildTask = 24,
1940-
Task_IsFuture = 25,
1941-
Task_IsTaskGroup = 26
1939+
Task_IsChildTask = 24,
1940+
Task_IsFuture = 25,
1941+
Task_IsGroupChildTask = 26,
19421942
};
19431943

19441944
explicit JobFlags(size_t bits) : FlagSet(bits) {}
@@ -1965,9 +1965,9 @@ class JobFlags : public FlagSet<size_t> {
19651965
FLAGSET_DEFINE_FLAG_ACCESSORS(Task_IsFuture,
19661966
task_isFuture,
19671967
task_setIsFuture)
1968-
FLAGSET_DEFINE_FLAG_ACCESSORS(Task_IsTaskGroup,
1969-
task_isTaskGroup,
1970-
task_setIsTaskGroup)
1968+
FLAGSET_DEFINE_FLAG_ACCESSORS(Task_IsGroupChildTask,
1969+
task_isGroupChildTask,
1970+
task_setIsGroupChildTask)
19711971
};
19721972

19731973
/// Kinds of task status record.
@@ -1979,14 +1979,18 @@ enum class TaskStatusRecordKind : uint8_t {
19791979
/// active child tasks.
19801980
ChildTask = 1,
19811981

1982+
/// A TaskGroupTaskStatusRecord, which represents a task group
1983+
/// and child tasks spawned within it.
1984+
TaskGroup = 2,
1985+
19821986
/// A CancellationNotificationStatusRecord, which represents the
19831987
/// need to call a custom function when the task is cancelled.
1984-
CancellationNotification = 2,
1988+
CancellationNotification = 3,
19851989

19861990
/// An EscalationNotificationStatusRecord, which represents the
19871991
/// need to call a custom function when the task's priority is
19881992
/// escalated.
1989-
EscalationNotification = 3,
1993+
EscalationNotification = 4,
19901994

19911995
// Kinds >= 192 are private to the implementation.
19921996
First_Reserved = 192,

0 commit comments

Comments
 (0)