@@ -115,6 +115,39 @@ import Swift
115
115
% 'operation: sending @escaping @isolated(any) () async throws -> ChildTaskResult'
116
116
% ],
117
117
% ),
118
+ % (
119
+ % 'SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY',
120
+ % [
121
+ % 'TaskGroup',
122
+ % 'ThrowingTaskGroup',
123
+ % ],
124
+ % [
125
+ % '@available(SwiftStdlib 5.1, *)',
126
+ % '@available(*, unavailable, message: "Unavailable in task-to-thread concurrency model", renamed: "addTask(operation:)")',
127
+ % ],
128
+ % ['addTask', 'addTaskUnlessCancelled'],
129
+ % [
130
+ % 'priority: TaskPriority? = nil',
131
+ % # throws and ChildTaskResult will be adjusted per task group type
132
+ % 'operation: sending @escaping @isolated(any) () async throws -> ChildTaskResult'
133
+ % ],
134
+ % ),
135
+ % (
136
+ % '',
137
+ % [
138
+ % 'DiscardingTaskGroup',
139
+ % 'ThrowingDiscardingTaskGroup',
140
+ % ],
141
+ % [
142
+ % '@available(SwiftStdlib 5.9, *)',
143
+ % ],
144
+ % ['addTask', 'addTaskUnlessCancelled'],
145
+ % [
146
+ % 'priority: TaskPriority? = nil',
147
+ % # throws and ChildTaskResult will be adjusted per task group type
148
+ % 'operation: sending @escaping @isolated(any) () async throws -> ChildTaskResult'
149
+ % ],
150
+ % ),
118
151
% ]:
119
152
%
120
153
% for TYPE in TYPES:
@@ -181,7 +214,7 @@ extension ${TYPE} {
181
214
/// - taskExecutor:
182
215
/// - taskExecutor: The task executor that the child task should be started on and keep using.
183
216
/// Explicitly passing `nil` as the executor preference is equivalent to
184
- /// calling the `addTask ` method without a preference, and effectively
217
+ /// calling the `${METHOD_NAME} ` method without a preference, and effectively
185
218
/// means to inherit the outer context's executor preference.
186
219
/// You can also pass the ``globalConcurrentExecutor`` global executor explicitly.
187
220
% end
@@ -196,9 +229,9 @@ extension ${TYPE} {
196
229
/// - Returns: `true` if the child task was added to the group;
197
230
/// otherwise `false`.
198
231
% end
199
- ${"\n ".join(ALL_AVAILABILITY)}
200
232
@_alwaysEmitIntoClient
201
- public mutating func ${METHOD_NAME}(
233
+ ${"\n ".join(ALL_AVAILABILITY)}
234
+ public mutating func ${METHOD_NAME}( // ${TYPE}/${METHOD_NAME}
202
235
${",\n ".join(adjust_params_for_group_kind(PARAMS))}
203
236
) ${ARROW_RETURN_TYPE}{
204
237
% if IS_IMPL_UNAVAILABLE:
0 commit comments